Rel=canonical
-
My website is built around a template, the hosting site say I can only add code into the body of the webpage not the header, will this be ok for rel=canonical
If it is my next question is redundant but as there is only one place to put it which urls do I need to place in the code
http://domain.com, www.domain.com or http://www.domain.com
the /default.asp option for my website does not seem to exist, so I guess is not relevant
thanks
-
http://www.domain.com is the same as www.domain.com. http is the protocol in which web pages are formatted and sent and would be part of any "complete" URL.
So to answer your question, if there are no redirects in place you can choose either the non www or www version for your canonical tags. However if you are looking to consolidate to a particular version I would look at updating your htaccess file to create a redirect rule from one version to the other.
#Force non-www to www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]or
#Force www to non-www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] -
Ok that means I can not use it on my main website but I have another hosted elsewhere where I can. So If I add the code in the head section of my web editor which links do I need to include
http://www.domain.com http://domain.com or www.domain.com and what is the correct syntax
I am assuming that my web editor changes 1 of those, but the change shows up on all three, so which is the authoritative page and which pages need to be referenced in the tag
I read the google article but I think I am more confused than ever
Thank you
-
rel=canonical needs to either go within the tags or the HTTP header.
http://googlewebmastercentral.blogspot.co.uk/2013/04/5-common-mistakes-with-relcanonical.html
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Canonical for multi store
Hello all, I need to make sure I am doing this correctly; I have one website and with two stores (content is mostly identical) with the following canonical tags; UK/EU Store: thespacecollective.com USA/ROW Store: thespacecollective.com/us/ Am I right in thinking that this is incorrect and that only one site should be referencing with the canonical tag? ie; UK/EU Store: thespacecollective.com USA/ROW Store: thespacecollective.com/us/ (please note the removed /us/ from the end of the URL)
Intermediate & Advanced SEO | | moon-boots0 -
Is the rel=publisher markup still relevant after google+ disappearance this year?
Hi, how would google+ disappearing after this year would affect the rel=publisher markup? Is it still relevant? Thanks!
Intermediate & Advanced SEO | | rascordido0 -
Rel Canonical Link on the Canonical Page
Is there a problem with placing a rel=canonical link on the canonical page - in addition to the duplicate pages? For example, would that create create an endless loop where the canonical page keeps referring to itself? Two examples that are troubling me are: My home site is www.1099pro.com which is exactly the same as www.1099pro.com/index.asp (all updates to the home page are made by updating the index.asp page). I want www.1099pro.com/index.asp to have the rel=canonical link to point to my standard homepage www.1099pro.com but any update that I make on the index page is automatically incorporated into www.1099pro.com as well. I don't have access to my hosting web server and any updates I make have to be done to the specific landing pages/templates. I am also creating a new website that could possible have pages with duplicate content in the future. I would like to already include the rel=canonical link on the standard canonical page even though there is not duplicate content yet. Any help really would be appreciated. I've read a ton of articles on the subject but none really define whether or not it is ok to have the rel=canonical link on both the canonical page and the duplicate pages. The closest explanation was in a MOZ article that it was ok but the answer was fuzzy. -Mike
Intermediate & Advanced SEO | | Stew2220 -
Set up a rel canonical
I have a question. I was wondering, if it was possible to set up a rel canonical. When I can't access the non canonical pages? For example, my site as at www.site.com , but the non cannocail is at site.com is their any way to set thet up without actually edting it at site.com ? Thanks for your help
Intermediate & Advanced SEO | | PeterRota0 -
Canonical url question
i just search seomoz tooll it say duplicate content for www.mysite.com and www.mysite.com/index.php should i use canonical url for this ? is yes then is this right ?
Intermediate & Advanced SEO | | constructionhelpline0 -
Cross Domain Rel Canonical for Affiliates?
Hi We use the Cross Domain Rel Canonical for duplicate content between our own websites, but what about affiliates sites who want our XML feed, (descriptions of our products). We don´t mind being credited but would this present a danger for us? Who is controlling the use of that cross domain rel canonical, us in our feed or them? Is there another way around it?
Intermediate & Advanced SEO | | xoffie0 -
Should we Use rel=canonical in ccTLDs websites
We have multilingual eCommerce websites with some content variations but majority of the content remains the same We have used rel=alternate hreflang on corresponding ccTLDs respective countries. for example on example.com -which is the oldest of these sites- we have used Now should we also use link rel="canonical" href="example.com" on all ccTLDs? What are the advantages and disadvantages of using it?
Intermediate & Advanced SEO | | CyrilWilson0 -
Rel canonical and duplicate subdomains
Hi, I'm working with a site that has multiple sub domains of entirely duplicate content. So, the production level site that visitors see is (for made-up illustrative example): 123abc456.edu Then, there are sub domains which are used by different developers to work on their own changes to the production site, before those changes are pushed to production: Larry.123abc456.edu Moe.123abc456.edu Curly.123abc456.edu Google ends up indexing these duplicate sub domains, which is of course not good. If we add a canonical tag to the head section of the production page (and therefor all of the duplicate sub domains) will that cause some kind of problem... having a canonical tag on a page pointing to itself? Is it okay to have a canonical tag on a page pointing to that same page? To complete the example... In this example, where our production page is 123abc456.edu, our canonical tag on all pages (this page and therefor the duplicate subdomains) would be: Is that going to be okay and fix this without causing some new problem of a canonical tag pointing to the page it's on? Thanks!
Intermediate & Advanced SEO | | 945010