Ad

How Do I Direct All Traffic Or Searches Going To Duplicate (or Similar URLs) To One URL On Our Website?

- 1 answer

I'll try to keep this as simple as possible, as i don't quite understand how to frame the question entirely correctly myself.

We have a report back on our website that is indicating duplicate meta titles and descriptions, which look very much (almost exactly) like the following - although i have used an example domain below:

http://example.com/green

https://example.com/green

http://www.example.com/green

https://www.example.com/green

But, only one of these actually exists as an HTML file on our server, which is:

https://www.example.com/green

As i understand it, i need to somehow tell google and other search engines which of these URLs is correct, and this should be done by specifying a 'canonical' link or URL.

My problem is that the canonical reference must apparently be added to any duplicate pages that exist, and not the actual main canonical page? But we don't actually have any other pages, beyond the one mentioned just above. So there is nowhere to set these canonical rel references?

I'm sure there must be a simple explanation for this that i am completely missing?

Ad

Answer

So it turns out that these were duplicate URLs which occur as a result of the fact that our website exists as a subdomain of our domain. Any traffic that arrives at example.com (our domain) needs permanent redirect to https://www.example.com, by way of a redirect within the htaccess documentation.

Ad
source: stackoverflow.com
Ad