0

Let's say I have the following three URLS.

   Url1: Domain/Home
   Url2: www.domain/home
   Url3: domain/home <-- Canonical

With respect to SEO, is it preferred to add a canonical link to Url1 & Url2, or is it better to do a 301 Redirect to Url3 when user visits Url1 and Url2?

I am looking for SEO best practice.


Update

Let's assume my canonical url is: https://www.domain/browse

In my application, I already redirect all http traffic to https. I also redirect url without www to urls with www.

My question is should I still add the following link to my HTML page? Or because I am redirecting other forms of url, I no longer need the following canonical link on my html page?

<link rel="canonical" href="https://www.domain/browse" />

In other words, is it better to redirect all variations of https://www.domain/browse (with/without www, lower-case/upper case, etc) to https://www.domain/browse or is it better to add the canonical link to my html page?

2

A 301 redirect and Canonical links are two fundamentally different concepts.

A canonical URL should be set up if you have two pages of similar content on your website or if you have content on your site that is also used on another site. You can use a canonical tag to point Google to the original content and make sure the first piece gets all of the credit and SEO benefits.

Canonical link: Use it if you do not want different, but similar pages, to compete with each other. Make it clear to the search engine what page you want to get the credit and rank for. Or how Google puts it "Use rel=canonical tags to clarify duplicate content, help search engines understand the content, and improve the chances your content will be ranked."

301 redirects: use when content/pages have moved permanently. Period.

In your specific case:

  1. On web server level (Apache, Nginx, ...): Redirect www to non-www or the other way round.
  2. Depending on Web Application Framework or CMS, make sure that all URLs are lower-case, and spaces between friendly URLs are replaced with "-" (hyphens).
  3. Try everything that you avoid duplicated URLs for the same content.
  4. Despite the www and non-www redirects (web server level), add redirects of Case sensitive URLs to lower-case URLs (301).
  • Thanks for your answer. I have update my question... I want to know if I am redirecting all other forms of url to the canonical url, do I still need to canonical link to my html page? – Hooman Bahreini Jul 7 at 23:42
  • @HoomanBahreini - if it is your canonical URL - then yes. Mind you, Google recommends setting canonical URLs even there are no multiple versions of it. Simply setting it tells the death engines what the preferred version is. So it always makes sense setting it. In all Web Applications we built we set the canonicals (for best practice and to protect against content piracy ;) – Georg Keferböck Jul 7 at 23:46
  • Thanks a lot, would you be able to add a link to the google recommendation that you are referring to please? I think it would be helpful for me (and perhaps future readers of your answer) – Hooman Bahreini Jul 7 at 23:49
  • Sure - there are several sources I believe that reference google (search for self referencing canonical links) - the recommendation where I first heard it first hand by Google was at their “webmaster blog - during office hours” - youtu.be/XOGOhWyNSf8 – Georg Keferböck Jul 8 at 0:26
  • Please let me know if there is anything else you need to know to mark the question as answered (^_-) – Georg Keferböck Jul 8 at 0:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.