Add canonical URL to default.asp page.

Add canonical URL to default.asp page.

Canonical URL is basically a technique used to specify the 'standard' URL for a page.

For example, http://www.myshop.com and http://www.myshop.com/default.asp essentially point to the same page. However, Google and other search engines will treat this as 2 different pages due to the differences in the URL and may incorrectly tag the pages for having duplicate contents.

Please follow the guide below on how to add a canonical URL to your default.asp page

1. Open the file "default.asp" using a text editor and locate the following code:
(Approximately located on line 3)

<!--#include file="shop$db.asp"-->

2. Now, modify the code above to the code below :

<%
dim canonicalURL
canonicalURL = "http://myshop.com"
%>
<!--#include file="shop$db.asp"-->

Replace http://myshop.com with the URL of your shopping cart.

3. The next step is to include the canonical URL to your template header file.

If you are using VP-ASP 7.00, the file should be located in /templates/xxxxxx/shoppage_header.htm. For 6.50, the shoppage_header.htm file is located on the root folder.

Open the shoppage_header.htm in a text or html editor and then locate the following code :

<head>

Modify the code above to :

<head>
<%
dim tempCanonical
on error resume next
tempCanonical = canonicalURL
if err.number = 0 then
if canonicalURL <> "" then
response.write ""
end if
end if
on error goto 0
%>

The same code will need to be applied to shopfrontpage_header.htm if you are using a unique frontpage header on 7.00


Times Viewed:
7989
Added By:
Frank
Date Created:
7/8/2011
Last Updated:
10/31/2011