Please take a look at my canonical tag - is it written right?
-
Hi there! I just changed the preferred domain settings from http://example.com to http://www.example.com and received a recommended action from Google: "Ensure that you specify the new host as canonical in all page links or sitemaps."
Could you please let me know if "the new host" is equal to "canonical" and if I have to include this tag into every page of my website ?
Thank you!
-
Thank you!
-
Unfortunately I'm not much of a coder, so I won't be able to guide you on the htaccess code piece. Regarding the Search Console items though, the tool treats every site that is setup as its own entity, which is why you need a country and XML for each. An example of why they do this because you might have different profiles for http://www.example.com/us and http://www.example.com/ca where the subfolder specifies the country. If they recycled the same info from each profile setup, the /ca site would be set to U.S. instead of Canada.
-
Thank you, Sean!
-
Logan,
Thank you very much for your advise! I figured out that it is going to be much of work going from page to page and set their canonicals:) Maybe updating my .htaccess will work out? I am wondering if that (please see below) would be the right thing to put in there?
RewriteEngine on
rewritecond %{http_host} ^example.com [nc]
rewriterule ^(.*)$ http://www.example.com/$1 [r=301,nc]Also, when I added the property (http://www.example.com) yesterday and set it as preferred domain, I was suggested to change the target country and submit a sitemap file for both http://example.com and http://www.example.com. I don't quite understand why do they want me to do that if the country and the sitemap are obviously the same?
-
Kirupa,
The syntax of your canonical tag is correct. However, there are a couple things you should know before you continue:
1- When Google says "Ensure that you specify the new host as canonical in all page links or sitemaps." it means they want to to update internal links and your XML sitemaps, so it's more involved than simply updating your canonical tag. Basically anywhere your URLs are referenced should be updated to reflect your new www-canonical URL structure.
2- You may have provided that one tag as an example, but DO NOT put that exact tag on every page of your site. Doing so would point search engines to the homepage of your site from any page they visit. Canonical tags are basically soft redirects that search engines follow, so when a bot sees a canonical tag on one page that points to another page, they leave and go to where the canonical is pointing them. Google will often de-index URLs that canonicalize to another URL, which I'm assuming you don't want
-
Hey Kirupa,
Short answer is that you're all good. The canonical is correct.
All the best,
Sean
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
-
How long does Google takes to re-index title tags?
Hi, We have carried out changes in our website title tags. However, when I search for these pages on Google, I still see the old title tags in the search results. Is there any way to speed this process up? Thanks
Technical SEO | | Kilgray0 -
Duplication, pagination and the canonical
Hi all, and thank you in advance for your assistance. We have an issue of paginated pages being seen as duplicates by pro.moz crawlers. The paginated pages do have duplicated by content, but are not duplicates of each other. Rather they pull through a summary of the product descriptions from other landing pages on the site. I was planing to use rel=canonical to deal with them, however I am concerned as the paginated pages are not identical to each other, but do feature their own set of duplicate content! We have a similar issue with pages that are not paginated but feature tabs that alter the URL parameters like so: ?st=BlueWidgets ?st=RedSocks ?st=Offers These are being seen as duplicates of the main URL, and again all feature duplicate content pulled from elsewhere in the site, but are not duplicates of each other. Would a canonical tag be suitable here? Many Thanks
Technical SEO | | .egg0 -
Meta Title Tags
Hi, Are Meta Title Tag deemed by google to be unique if I use the same phrases by in a different order. For example 3 different pages <colgroup><col width="475"></colgroup>
Technical SEO | | Studio33
| Online Invoicing Software | Online Invoicing | Invoicing Software |
| Online Invoicing | Invoicing Software | Online Invoicing Software |
| Invoicing Software | Online Invoicing Software | Online Invoicing | You will not it is the same keywords just in a different order. Is this unique enough or will google not be happy about it. Thanks Andrew0 -
Home page canonical issues
I think I’ve got a canonical issue with a client’s site that I’m having problems with I’ve noticed in their analytics that they receive traffic from themselves. I’ve used ‘ rel canonical’ throughout the site to avoid any dup issues and I have 301’ed every other variation of the home page I can think of. I don’t have full access to the back end of the host to control any of the iis as it’s an asp site. They seem to be getting traffic from their site under the URL of, example.com I’ve 301 redirected www.example.com/home.asp www.example.com/default.asp www.example.com/index.asp to www.example.com And 'rel canonical' the home page to www.example.com but still seem to be having the same problem any ideas? Thanks
Technical SEO | | FarkyRafiq0 -
Wordpress Canonical Problem
I'm using wordpress for my website but m unable to implement Canonical tag property for pages under the same category, Like for matt's blog: The Tag is same .. for all pages under that category: http://www.mattcutts.com/blog/type/googleseo/ & http://www.mattcutts.com/blog/type/googleseo/page/2/ is it some hack or some plugin ? please suggest! thanks
Technical SEO | | AnkitRawat0 -
Rel=canonical issue
Re. http://www.appetise.com. We have been alerted that we are "not making appropriate use of the rel=canonical tag". Please could someone just clarify this for us and let us know the recommended remedial action we need to take to rectify the issue? Many Thanks, RB
Technical SEO | | E-resistible0 -
Canonical tag in preferred and duplicate page
Hi, I have a super spiffy (not) CMS that tends to create some pages at the root level of the site (not where I want it) i.e. www.site.com/page.htm as well as the desired location i.e. www.site.com/category/keyword/page.htm . Now obviously a canonical tag inserted into the URL at the undesired location would be the best option, however the source code is exactly the same for both pages (can’t change this) i.e. if I put the canonical tag that reads www.site.com/category/keyword/page.htm"/> it will appear in the head section of both pages, the desired URL and the non desired URL. Will a canonical tag inserted into the head section of a the preferred URL directing the search engine spiders pretty much to itself cause more grieft than the solution it offers re duplicate content ? Marc
Technical SEO | | NRMA0 -
Using the Canonical Tag
Hi, I have an issue that can be solve with a canonical tag, but I am not sure yet, we are developing a page full of statistics, like this: www.url.com/stats/ But filled with hundreds of stats, so users can come and select only the stats they want to see and share with their friends, so it becomes like a new page with their slected stats: www.url.com/stats/?id=mystats The problems I see on this is: All pages will be have a part of the content from the main page 1) and many of them will be exactly the same, so: duplicate content. My idea was to add the canonical tag of "www.url.com/stats/" to all pages, similar as how Rand does it here: http://www.seomoz.org/blog/canonical-url-tag-the-most-important-advancement-in-seo-practices-since-sitemaps But I am not sure of this solution because the content is not exactly the same, page 2) will only have a part of the content that page 1) has, and in some cases just a very small part. Is the canonical tag useful in this case? Thank you!
Technical SEO | | andresgmontero0