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
-
Putting my content under domain.com/content, or under related categories: domain.com/bikes/content ?
Hello This questions plays on what Joe Hall talked about during this years' MozCon: Rethinking Information Architecture for SEO and Content Marketing. My Case:
Intermediate & Advanced SEO | | Inevo
So.. we're working out guidelines and templates for a costumer (sporting goods store) on how to publish content (articles, videos, guides) on their category pages, product pages, and other pages. At this moment I have 2 choices:
1. Use a url-structure/information architecture where all the content is placed in one subfolder, for example domain.com/content. Although it's placed here, there's gonna be extensive internal linking from /content to the related category pages, so the content about bikes (even if it's placed under domain.com/bikes) will be just as visible on the pages related to bikes. 2. Place the content about bikes on a subdirectory under the bike category, **for example domain.com/bikes/content. ** The UX/interface for these two scenarios will be identical, but the directories/folder-hierarchy/url structure will be different. According to Joe Hall, the latter scenario will build up more topical authority and relevance towards the category/topic, and should be the overall most ideal setup. Any thoughts on which of the two solutions is the most ideal? PS: There is one critical caveat her: my costumer uses many url-slugs subdirectories for their categories, for example domain.com/activity/summer/bikes/, which means the content in the first scenario will be 4 steps away from the home page. Is this gonna be a problem? Looking forward to your thoughts 🙂 Sigurd, INEVO0 -
301 / 404 & Getting Rid of Keyword Pages
I had a feeling that my keyword focused pages were causing my site not to rank well. I do not have that many keywords. I have 2 main keyword phrases along with 6 city locations. For example (fake) "tea house tampa" "tea house clearwater" "tea house sarasota" and "tea room tampa" "tea room cleawater" "tea house sarasota". So, I don't feel that I need that many pages. I feel like I can optimize my home page and maybe 1 or 2 topic pages. Right now, I have a keyword for each of those phrases. These are all internal pages on 1 domain. Not multiple domains. Sooo... I tested it by 301ing a few of my "tea house" KW pages to the home page. And low and behold... my home page rose BIG TIME! Major improvement! I'm talking like 13th to 2nd! Here is my question... how should I proceed? My SEO has warned me against 301ing too many pages all pointing to the home page. He says that will negatively impact my ratings. Should I 404 some pages? Should I build a "tea room" topic page and 301 that set there? What is worse? 301 or 404? How many is too many? I'm really excited by these results, but I'm scare to move forward and hurt what has happened. Thanks in advance!
Intermediate & Advanced SEO | | CalicoKitty20000 -
Using Canonical Attribute
Hi All, I am hoping you can help me? We have recently migrated to the Umbraco CMS and now have duplicate versions of the same page showing on different URLs. My understanding is that this is one of the major reasons for the rel=canonical tag. So am I right in saying that if I add the following to the page that I want to rank then this will work? I'm just a little worried as I have read some horror stories of people implementing this attribute incorrectly and getting into trouble. Thank you in advance
Intermediate & Advanced SEO | | Creditsafe0 -
Sitemaps: HTML and/or XML?
Can someone explain sitemaps, and if you need html and/or xml? I have a site with a few html sitemaps, one for products, one for categories. I have another site with just one xml sitemap for my entire site (which has massive pages, 600k+). Should I be dividing the site with massive pages into html sitemaps like my other site?
Intermediate & Advanced SEO | | WebServiceConsulting.com0 -
Website.com/blog/post vs website.com/post
I have clients with Wordpress sites and clients with just a Wordpress blog on the back of website. The clients with entire Wordpress sites seem to be ranking better. Do you think the URL structure could have anything to do with it? Does having that extra /blog folder decrease any SEO effectiveness? Setting up a few new blogs now...
Intermediate & Advanced SEO | | PortlandGuy0 -
Rel=canonical on image pages
Hi, Im working on a Wordpress hosted blog site. I recently did a "site:search" in Google for a specific article page to make sure it was getting crawled, and it returned three separate URLs in the search results. One was the article page, and the other two were the URLs that hosted the images that are found in the article. Would you suggest adding the rel=canonical tag to the pages that host the images so they point back to the actual context article page? Or are they fine being left alone? Thank you!
Intermediate & Advanced SEO | | dbfrench0 -
Canonical Meta Tag Best Practices
I've noticed that some website owners use canonical tags even when there may be no duplicate issues.For examplewww.examplesite.com has a canonical tag.......rel="canonical" href="http://www.examplesite.com/" />www.examplesite.com/bluewidget has a canonical tag.......rel="canonical" href="http://www.examplesite.com/bluewidget/" />Is this recommended or helpful to do this?
Intermediate & Advanced SEO | | webestate0 -
Should I be using rel canonical here?
I am reorganizing the data on my informational site in a drilldown menu. So, here's an example. One the home page are several different items. Let's say you clicked on "Back Problems". Then, you would get a menu that says: Disc problems, Pain relief, paralysis issues, see all back articles. Each of those pages will have a list of articles that suit. Some articles will appear on more than one page. Should I be worried about these pages being partially duplicates of each other? Should I use rel-canonical to make the root page for each section the one that is indexed. I'm thinking no, because I think it would be good to have all of these pages indexed. But then, that's why I'm asking!
Intermediate & Advanced SEO | | MarieHaynes0