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
-
Duplicate, submitted URL not selected as canonical
Hi all, A number of our pages have dropped out of search rankings. It seems they are being marked as "Duplicate, submitted URL not selected as canonical" However, the page Google is choosing as the canonical is totally different - different headings, titles, metadata, content on the page. We are completely mystified as to why this is happening. If anyone can shed any light, it would be hugely appreciated! Example URL is this one:
Technical SEO | | Eric_S
https://www.vouchedfor.co.uk/IFA-financial-advisor-mortgage/london Which Google seems to think is a duplicate of this: https://www.vouchedfor.co.uk/solicitor/london0 -
Multiple H1 tags in Squarespace
Hi. I'm using Squarespace, and I've noticed they assign the page title and site title h1 tag status. So if I add an on-page h1 tag, that's three in total. I've seen what Matt Cutts said about multiple h1 tags being acceptable (although that video was back in 2009 and a lot has changed since then). But I'm still a little concerned that this is perhaps not the best way of structuring for SEO. Could anyone offer me any advice? Thanks.
Technical SEO | | The_Word_Department0 -
My beta site (beta.website.com) has been inadvertently indexed. Its cached pages are taking traffic away from our real website (website.com). Should I just "NO INDEX" the entire beta site and if so, what's the best way to do this? Please advise.
My beta site (beta.website.com) has been inadvertently indexed. Its cached pages are taking traffic away from our real website (website.com). Should I just "NO INDEX" the entire beta site and if so, what's the best way to do this? Are there any other precautions I should be taking? Please advise.
Technical SEO | | BVREID0 -
Rel = Canonical in Blog Posting
Hello, I keep coming back to rel=canonical issues! I noticed when I "view pagesource" that my drupal blog posting automatically creates link rel="canonical" href="/sample-blog-title" /< pattern (with the > reversed) in the source code. I'm getting a lot of Rel=Canonical warnings and double content warnings from Seomoz so I've been trying to insert link rel="canonical" href="http://www.example.com/blog/my-awesome-blog-post"< but the page won't retain the code for some reason. I'm entering the code in Plain Text, but saving the document as Full HTML. Is there a better piece of code I can put in to demonstrate that the original blog page is the original source? Thanks!
Technical SEO | | OTSEO0 -
Canonical URL
I previously set the canonical Url in google web masters to the non www version, when I check my on page opt, it tells me that I have a critical issue with this. Should I change it in google web masters back to the www version? if so is there the possibility of negative results? Or is there a better way to deal with this? Note, I have inbound links pointing to both types.
Technical SEO | | bronxpad0 -
Technical question about site structure using a CMS, redirects, and canonical tag
I have a couple of sites using a particular CMS that creates all of the pages under a content folder, including the home page. So the url is www.example.com/content/default.asp. There is a default.asp in the root directory that redirects to the default page in the content folder using a response.redirect statement and it’s considered a 302 redirect. So all incoming urls, i.e. www.example.com and example.com and www.example.com/ will go to the default.asp which then redirects to www.example.com/ content/default.asp. How does this affect SEO? Should the redirect be a 301? And whether it’s a 301 or a 302, can we have a rel=canonical tag on the page that that is rel=www.example.com? Or does that create some sort of loop? I’ve inherited several sites that use this CMS and need to figure out the best way to handle it.
Technical SEO | | CHutchins1 -
Canonical Issues
Hi Guys, I have a technical question. Ive started optimising an ecommerce site for a client and come across some duplicate content issues:- This page: http://www.bracknelllamps.com/projector-manufacturer/SANYO/70 is actually indexed in Google as:- http://www.bracknelllamps.com/projector-lamps.php?make=SANYO Both pages have the same content and I'm guessing the indexed page refers to an old way of navigating the site. As I'm concerned about duplicate content issues, what's the best approach as this seems to be the case for all 'projector manufacturer' pages. would it be to 301 redirect each manufacturer url (this could take forever with 107) manufacturers or rel="canonical" tag? to show Google which page I want indexing? Kind Regards Neil
Technical SEO | | nezona0 -
Please help....
Hi Guys! Ok a bit of a funny one here which is causing a confusion between us and a web designer and I was wondering if anyone on here might be able to help. Just a bit of back ground for you, the website has been built on Concrete 5 and when we tried to building a sitemap we found over 110,000 pages. When we spoke to the web designer they have told us that within Google webmaster tools, Google has only indexed 58. But.... (and this is where things get a little confusing, so bare with me.) I thought that cant be right so into the Google search bar I put in site:www.sitename.co.uk and had 217 results appear. So google cant have just 58 pages indexed, right? So after speaking to the designer he then posted on the Concrete 5 help forum, to try and help figure it out. I have posted his exact forum post below that the web designer has asked: I'm having some issues where a site we are working on seems to be making multiple pages going to the same page. An SEO specialist has run a report and found a number of duplicate pages created by C5. We are concerned that this is going to dilute or worse penalise the way google sees the site. http://www.sitename.co.uk/
Technical SEO | | NoisyLittleMonkey
[http://www.sitename.co.uk/index.php?cID=?akID[155]atSelectOptionID...
[http://www.sitename.co.uk/index.php?cID=?akID[155]atSelectOptionID...
[http://www.sitename.co.uk/index.php?cID=?akID[155]atSelectOptionID... Is there a way of stopping google from accessing these duplicate 'cID' pages and stop them being made? Also is there a way of getting rid of the ones that are there? We've done a number of sites in C5 and are beginning to get concerned about this... So I guess my question is: If I can access the same content via 4-5 different cID's is that classed as duplicate content? Thanks in advance guys, and any help would greatly appreciated. 🙂0