Canonical / 301 Redundancy
-
Suppose I have two dynamic URLs that lead to the identical page:
www.example.com/product.php?x=1&y=1
and
www.example.com/product.php?y=1
The x=1 parameter had some historical meaning, but is now unused. All references to the x=1 parameter have been removed from internal links and sitemaps.
I have implemented two solutions:
First, the header of www.example.com/product.php?x=1&y=1 includes:
Second, the .htaccess file includes the following:
Redirect permanent /product.php?x=1&y=1 http://www.example.com/product.php?y=1
Questions:
1. I assume that since canonical is still relatively new, it's best to play it safe and implement both solutions. Is this correct?
2. When I point my browser to www.example.com/product.php?x=1&y=1, it does NOT redirect to www.example.com/product.php?y=1. The address bar continues to show the non-canonical URL. Is this because the canonical tag somehow takes precedence over the 301 redirect?
3. How long will Google Webmaster Tools continue to show these as duplicates, even though I've implemeted BOTH canonical and 301? It's been a few weeks and I thought it would have rolled off by now.
Thanks!
-
Note to self, and to others who see this thread later, the 301 for this situation is:
RewriteCond %{QUERY_STRING} x=([0-9]+)&y=([0-9]+)
RewriteRule ^product.php$ http://www.example.com/product.php?y=%2 [r=301,nc]
-
Dr. Pete,
Thanks for the very helpful answer. I've gotten rid of the rel-canonical tag for this part of the site and I'll try to figure out what's up with the 301s.
BTW, I listened to the recorded version of your "future proofing" webinar this morning and learned a lot.
Akira
-
(1) Honestly, I tend not to double-up, if for no other reason that you can't really tell what's work and what isn't. Keep in mind, too, that these tools do have different purposes. 301-redirects impact everyone (users and bots), whereas rel-canonical is only for search. If a 301 is appropriate, then just use a 301.
(2) If the address bar isn't changing, your 301-redirect isn't working. Test it with a header checker:
http://tools.seobook.com/server-header-checker/
A rel-canonical tag will not override browser behavior (at least, not at this point in time).
(3) It can take weeks to clear, and it sounds like your 301 isn't working right, so that's going to exacerbate the problem. The page has to re-crawl and re-cache, and GWT may still show the message for a couple of weeks after that.
Personally, I'd drop the canonical and fix the 301-redirect.
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
-
I've got duplicate pages. For example, blog/page/2 is the same as author/admin/page/2\. Is this something I should just ignore, or should I create the author/admin/page2 and then 301 redirect?
I'm going through the crawl report and it says I've got duplicate pages. For example, blog/page/2 is the same as author/admin/page/2/ Now, the author/admin/page/2 I can't even find in WordPress, but it is the same thing as blog/page/2 nonetheless. Is this something I should just ignore, or should I create the author/admin/page2 and then 301 redirect it to blog/page/2?
Intermediate & Advanced SEO | | shift-inc0 -
Membership/subscriber (/customer) only content and SEO best practice
Hello Mozzers, I was wondering whether there's any best practice guidance out there re: how to deal with membership/subscriber (existing customer) only content on a website, from an SEO perspective - what is best practice? A few SEOs have told me to make some of the content visible to Google, for SEO purposes, yet I'm really not sure whether this is acceptable / manipulative, and I don't want to upset Google (or users for that matter!) Thanks in advance, Luke
Intermediate & Advanced SEO | | McTaggart0 -
301 Directs
We have found a lot of 404 error pages that we have transferred with 301 directs. My questions is, should these 301 directs be marked as a NF (nofollow)?
Intermediate & Advanced SEO | | Essential-Pest0 -
Previously owned domain & canonical
Hi, I've recently joined the business and as part of the cleanup process I got told that we owned this domain preferredsafaris.com with some very similar content to our main site southernafricatravel.com. We're no longer owns the preferredsafaris.com domain but looking at Google's cache for it we realised that the title, meta description & page shown when looking at the 'cached page' is for our current domain even though it is showing the 'correct' URL there. I imagine this might have something to do with canonical set on those pages but the weird thing is all those pages now render 404 & do not show a canonical in the source code. I have used Google Removal Tool https://www.google.com/webmasters/tools/removals for all those URLs & Google says that it has removed them & yet they're still showing. What do you suggest? Any potential issue in regards to duplicate content here? Cheers, Julien
Intermediate & Advanced SEO | | SouthernAfricaTravel0 -
URL categorization / subfolders
Hi Mozzers, We're currently in the process of a website redesign with new CMS and have the opportunity to change URL and structure. I would love some opinions as to what the best practise will be. A quick prerequisite, the website is entirely about France. French property, living, holidays, forum - everything. Therefore, we're unsure of the usage of the word France/French. Presently, we're running Classic ASP which allows for one subfolder then dynamic article ID. In my examples, I will take our activity holidays URL. At present this is /france-activity-holidays/DisplayArticle.asp?ID=12345. We know that DisplayArticle.asp?ID=12345 will simply become [article-title], however, its the preceding subfolders I would like some help with. Here are our thoughts on the options available. Can you please vote as to which you think is the best? /france-activity-holidays/ (one subfolder per category, as at present) /france/holidays/activity/ (always have a first subfolder with the word france) /holidays-to-france/activity-holidays/ (france in the primary subfolder) /holidays/activity-holidays-france/ (france in the secondary subfolder) /holidays/activity/ (because the whole website is about France, it is redundant to have /france/) /French-holidays/activity/ My gut feeling is either number 2 or 5. Concise, good for UX, OK for SEO. However, there is very little information around that is relevant to our sector. Thanks in advance! Matt
Intermediate & Advanced SEO | | Horizon0 -
Rel Canonical attribute order
So the position of the attribute effect the rel canonical tags' ability to function? is the way I see it across multiple documents and websites. Having a discussion with someone in the office and there is a website with it set up as: Will that cause any problems? The website is inquestion still has both pages indexed within Google using the SITE:domain.com/product as well as SITE:domain.com/category/product
Intermediate & Advanced SEO | | jasondexter0 -
Urgent Site Migration Help: 301 redirect from legacy to new if legacy pages are NOT indexed but have links and domain/page authority of 50+?
Sorry for the long title, but that's the whole question. Notes: New site is on same domain but URLs will change because URL structure was horrible Old site has awful SEO. Like real bad. Canonical tags point to dev. subdomain (which is still accessible and has robots.txt, so the end result is old site IS NOT INDEXED by Google) Old site has links and domain/page authority north of 50. I suspect some shady links but there have to be good links as well My guess is that since that are likely incoming links that are legitimate, I should still attempt to use 301s to the versions of the pages on the new site (note: the content on the new site will be different, but in general it'll be about the same thing as the old page, just much improved and more relevant). So yeah, I guess that's it. Even thought the old site's pages are not indexed, if the new site is set up properly, the 301s won't pass along the 'non-indexed' status, correct? Thanks in advance for any quick answers!
Intermediate & Advanced SEO | | JDMcNamara0 -
Canonical OR redirect
Hi, i've a site about sport which cover matches. for each match i've a page. last week there was a match between: T1 v T2 so a page was created: www.domain.com/match/T1vT2 - Page1 this week T2 host T1, so there's a new page www.domain.com/match/T2vT1 - Page2 each page has a unique content with Authorship, but the URL, Title, Description, H1 look very similar cause the only difference is T2 word before T1. though Page2 is available for a few days, on site links & sitemap, for the search query "T2 T1 match" Page1 appears on the SERP (high location). of course i want Page2 to be on SERP for the above query cause it's the relevant match. i even don't see Page2 anywhere on the SERP and i think it wasn't indexed. Questions: 1. do you think google see both pages as duplicated though the content is different? 2. is there a difference when you search for T1 vs T2 OR T2 vs T1 ? 3. should i redirect 301 Page1 to Page2? consider that all content for Page1 and the Authorship G+ will be lost. 4. should i make rel=canonical on Page1 to Page2? 5. should i let google sort it out? i know it's a long one, thanks for your patience. Thanks, Assaf
Intermediate & Advanced SEO | | stassaf0