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
-
Do cross domain rel canonical and original source tags have to be the same?
I have placed content on a partner site using the same content that is on my site. I want the link juice from the site and the canonical tag points back to my site. However, they are also using the original source tag as they publish a lot of news. If they have the original source tag as the page on their site and the canonical as mine, is this killing the link juice from the canonical and putting me in jeopardy of a duplicate content penalty? Google has already started indexing the page on their site with the same content.
Intermediate & Advanced SEO | | SecuritiesCE0 -
Do I put a canonical tag on the page I am pointing to?
Lets say B i a duplicate page of A (main page). I understand I have to put canonical tag under B to point to A. Do I also put canonical tag under the main page A? Is it necessary? I understand that A would then tell Google that it is preferred page of A? Is this a correct understanding?
Intermediate & Advanced SEO | | andypatalak0 -
Attribution of port number to canonical links...ok?
Hi all A query has recently been raised internally with regard to the use of canonical links. Due to CMS limitations with a client who's CMS is managed by a third party agency, canonical links are currently output with the port number attributed, e.g. example.com/page:80 ...as opposed to the correct absolute URL: example.com/page Note port number are not attributed to the actual page URLs. We have been advised that this canonical link functionality cannot be amended at present. My personal interpretation of canonical link requirements is that such a link should exactly match the absolute URL of the intended destination page, my query is does this extend to the attribution of port number to URLs. Is the likely impact of the inclusion of such potentially incorrect URLs likely to be the same as purely incorrect canonical links. Thanks
Intermediate & Advanced SEO | | 26ryan0 -
Canonical and Rel=next/prev Implementation
Hi, I have an ecommerce site that allows users to view numerous pages and sort by a number of options on categories. I've read numerous posts around my issue but am still a little confused on what is best practice with regards to the canonical tag and rel=next and prev. Below is an example of the various page/sort by URL's: Paginated URL: http://www.example.co.uk/category/subcategory.html?p=3 Sort by URL: http://www.example.co.uk/category/subcategory.html?dir=desc&order=price Paginated & Sort by URL: http://www.example.co.uk/category/subcategory.html?dir=desc&order=price&p=3 It is not viable for us to use a canonical tag to the view all page as some of the categories contain a large number of products and therefore would not have the best load speeds. Is it best to use the below structure when it comes to the canonical tag and rel=next and prev? Paginated URL: http://www.example.co.uk/category/subcategory.html?p=3 Sort by URL: http://www.example.co.uk/category/subcategory.html?dir=desc&order=price Paginated & Sort by URL: http://www.example.co.uk/category/subcategory.html?dir=desc&order=price&p=3 http://www.example.co.uk/category/subcategory.html?dir=desc&order=price&p=2" /> Thanks
Intermediate & Advanced SEO | | GrappleAgency0 -
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 -
Canonical VS Rel=Next & Rel=Prev for Paginated Pages
I run an ecommerce site that paginates product pages within Categories/Sub-Categories. Currently, products are not displayed in multiple categories but this will most likely happen as time goes on (in Clearance and Manufacturer Categories). I am unclear as to the proper implementation of Canonical tags and Rel=Next & Rel=Prev tags on paginated pages. I do not have a View All page to use as the Canonical URL so that is not an option. I want to avoid duplicate content issues down the road when products are displayed in multiple categories of the site and have Search Engines index paginated pages. My question is, should I use the Rel=Next & Rel=Prev tags on paginated pages as well as using Page One as the Canonical URL? Also, should I implement the Canonical tag on pages that are not yet paginated (only one page)?
Intermediate & Advanced SEO | | mj7750 -
Is having a canonical tag for the link that IS the canonical a negative thing?
Throughout our site, canonical tags have been added where needed. However, the canonical tags are also included for the canonical itself. For example, for www.askaquestion.com, the canonical tag has been added as www.askaquestion.com. Will this have a negative impact or does it not really matter whether there is such a loop?
Intermediate & Advanced SEO | | kbbseo0 -
Canonical category pages
A couple of years ago I used to receive a lot of traffic via my category pages but now I don't receive as much, in the past year I've modified the category pages to canonical. I have 15 genres for the category pages, other than the most recent sorting there is no sorting available for the users on the cat pages, a recent image link added can over time drop off to page 2 of the category page, for example mysite.com/cat-page1.html = 100 image links per page with numbered page navigation, number of cat pages 1-23. New image link can drop off to page 2. mysite.com/dog-page1.html = 100 image links per page with numbered page navigation, number of cat pages 1-53. New image link can drop off to page 2. mysite.com/turtle-page1.html = 100 image links per page with numbered page navigation, number of cat pages 1-2. New image link can drop off to page 2. Now on the first page (eg mysite.com/cat-page1.html) I've set this up to rel= canonical = mysite.com/cat-page1.html One thing that I have noticed is the unique popup short description tooltips that I have on the image links only appears in google for the first pages of each category page, it seems to ignore the other pages. In view of this am I right in applying canonical ref or just treating it as normal pages.? thanks
Intermediate & Advanced SEO | | Flapjack0