Hi all,
The canonical tag on our homepage is currently pointing at "/default.aspx". The way it is now, it’s telling Google that "hotsaucedepot.com" is not the real version of the homepage and that instead they should be indexing "hotsaucedepot.com/default.aspx," a page with no links pointing at it and no authority.
Then "default.aspx" is 301 redirecting to "hotsaucedepot.com" which tells search engines not to index that page either. This creates a recursive loop that can confuse search engines.
We want to leave the 301 redirect in place because we don’t want "/default.aspx" to be indexed, but we need to update the canonical tag to hotsaucedepot.com instead of "/default.aspx". How do we do this?
Thank you so much!
Mary
Canonical Question: / VS. /default.aspx
Re: Canonical Question: / VS. /default.aspx
Also we are using AbleCommerce Gold R8 (build 7345)
Re: Canonical Question: / VS. /default.aspx
This can be achieved by using bit of a code. Open Website/App_Code/PageHelper.cs, locate the following code inside BindMetaTags function:
and replace with:
This should update the canonical link as you want.
Code: Select all
objectUrl = objectUrl.Replace("/mobile/", "/");
Code: Select all
objectUrl = objectUrl.Replace("/mobile/", "/");
string defaultPage = string.Format("{0}default.aspx", storeUri);
if (objectUrl.ToLowerInvariant().Equals(defaultPage))
objectUrl = objectUrl.ToLowerInvariant().Replace("/default.aspx", "/");
Re: Canonical Question: / VS. /default.aspx
Excellent, this worked perfectly thank you!