Adnan123
Adnan123 asked
Member (7 upvotes)

How to prevent duplicate URLs?

After getting my website created by a web design company, I've noticed that different URLs equal the same page.

For example

example.com/news/thispage

is the same as

example.com/news/thispage/random text

How do I prevent Google/Bing from indexing both pages & tell them which page is the one I want to use?
Avatar for member Chedders
Chedders
Moderator (163 upvotes)

This is a job for the canonical tag. in your case you would need to add to the head

<link rel="canonical" href="https//example.com/thispage/random text" />

Assuming thats how you want it to appear in google search results

It's a powerful and often underused tag within websites, It helps remove duplicate content and also cut down the variations of URLS for the same page. Its a clear signal to google which is the correct page. 

Consider the following as well 

  • http://example.com
  • https://example.com
  • http://www.example.com
  • https://www.example.com
  • https://www.Example.com

On most websites all the above would render the same page but the url is different, So you would have 5 versions of the same page producing by its very nature duplicate content. 

The use of a canonical tag tells google which is the correct one.

And yes I did also mean to put in Example.com with a capital E as that is still a separate page in googles eyes, Seeing as you have no control how users may link to you every page on your site should have a self referencing canonical tag.

Hope that makes sense.

Good advice?
3
0
Comments 0
login to reply
Thanks for leaving no stone unturned. Really appreciate it!
Copyright ©2020 SEOChat. All Rights Reserved.