0

When I click on a link in my site it takes me to a new page in the same tab. The prefix in the displayed url within the browser and the page content does update. The canonical url within the element inspector however doesn't change to the new url.

I start at

<link rel="canonical" href="mywebsite.com/page1">

then proceed to click on a link which takes me to mywebsite.com/page2, but the canonical url remains as page1, even though I'm looking at page2. How can I make sure the canonical url updates when I'm taken to a new page?

1 Answers1

0

It sounds like the html for page2 is setting the canonical URL.

Does your page2 contain a line like this?

<link rel="canonical" href="mywebsite.com/page1">

You should be able to safely remove the entire line and fix the problem. Are you using a cms or anything else that could messing with things automatically? It's possible the page could be making it look like you went to the new URL when you click on the link without actually reloading doing something like this: modify URL without reloading the page

Andrew Hulterstrom
  • 1,563
  • 4
  • 18