I think it might be a good idea to try to use the pagehide event instead to try to meet this requirement. Since you can do better testing on your end on how this might affect other factors, I decided not to make the change myself.
It might be a good idea to attempt to test this for a future version. Google is becoming very specific in what they're looking for and this will impact ranking.
On another note, I need to address the Canonical URL issue again. I don't think you guys understand how serious this is. And anyone who uses AbleCommerce is penalized because the homepage creates an entirely different page called default.
Now that we're undergoing even further SEO optimization, we have run various SEO tools against other AbleCommerce websites, and all these tools agree that this is not correct. You can run these tools yourself and come to the same conclusion. No one using your software benefits from this.
All the tools have the same warning "The specified canonical link points to a different page.", and because this is happening on the main index page, AbleCommerce users are going to suffer.
On my post dated 29 days ago, your recommendation was "objectURL should not be equal to "default" = (!objectUrl.Equals("Default")"
Why doesn't this work?I'm still using " (!objectUrl.Contains("Default")))", which works perfectly as long as default is not included in any other url.
Await your feedback—thanks
Just in case you need to see the full contents of the meta-tag file. Yes I know I'm hard coding the webURL, this is intentional.
@{
string description = ViewBag.MetaDescription ?? string.Empty;
string keywords = ViewBag.MetaKeywords ?? string.Empty;
string objectUrl = ViewBag.ObjectUrl ?? string.Empty;
string webUrl = "https://www.myradiomall.com";}
<meta http-equiv = "content-language" content = "en">@if (!string.IsNullOrEmpty(description)) {
<meta name="description" content="@description">
}
@if (!string.IsNullOrEmpty(keywords)) {
<meta name="keywords" content="@keywords">
}
@if (!string.IsNullOrEmpty(objectUrl) && (!objectUrl.Contains("Default"))) {
<link rel="canonical" href="@objectUrl" />
}
@if (objectUrl.Contains("Default")) {
<link rel="canonical" href="@webUrl" />
}Edited by user Friday, July 8, 2022 8:18:43 AM(UTC)
| Reason: Not specified