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
-
Will this 301 redirects help me?
Hello, recently, I found out about all the SEO advantages from 301 redirects. I had 3 websites that are now expired, their topic was Counter Strike 1.6 servers. All of these websites were registered 9 years ago and have few good backlinks (from website with 1%-3% spam score and DA 30+). Now I have one website that is not only about Counter Strike 1.6 but also many other Steam shooter games. If I revive these 3 old domains and 301 redirect them to my new one, will it help me with SEO and increase my ranking on Google?
Intermediate & Advanced SEO | | Bonito19930 -
Copied Content - Define Canonical
Hello, The Story I am working on a news organization. Our website is the https://www.neakriti.gr My question regards copied content with source references. Sometimes a small portion of our content is based on some third article that is posted on some site (that is about 1% of our content). We always put "source" reference if that is the case. This is inevitable as "news" is something that sometimes has sources on other news sites, especially if there is something you cannot verify or don't have immediate sources, and therefore you need to state that "according to this source, something has happened". Here is one article of ours that has a source from another site: https://www.neakriti.gr/article/ellada-nea/1503363/nekros-vrethike-o-agnooumenos-arhimandritis-stin-lakonia/ if you open the above article you will see we have a link to the equivalent article of the original source site http://lakonikos.gr/epikairothta/item/133664-nekros-entopistike-o-arximandritis-p-andreas-bolovinos-synexis-enimerosi Now here is my question. I have read in other MOZ forum articles that a "canonical" approach solves this issue... How can we be legit when it comes to duplicate content in the eyes of search engines? Should we use some kind of canonical link to the source site? Should the "canonical" be inside the link in some way? Should it be on our section? Our site has AMP equivalent pages (if you add the /amp keyword at the end of the article URL). Our AMP pages have canonical to our original article. So if we have a "canonical" approach how would the AMP be effected as well? Also by applying a possible canonical solution to the source URL, does that "canonical" effect our article as not being shown in search results, thus passing all indexing to the canonical site? (I know that canonical indicates what URL is to be indexed). Additionally, does such a canonical indication make us legit in such a case in the eyes of search engines? (i.e. it eliminates any possible article duplication for original content in the eyes of search engines?). Or simply put, having a simple link to the original article (as we have it now) is enough for the search engines to understand that we have reference to original article URL? How would we approach this problem in our site based on its current structure?
Intermediate & Advanced SEO | | ioannisanif0 -
Tough 301 redirect with a /www in it
Hi Mozzers, I'm using Eggplants 301 redirect via wordpress and for some reason I can't redirect one url. The example of it is below: www.website.com/news/www.website.com As you can see, it looks like there's 2 url's and this plugin doesn't do the trick. Does anyone have any suggestions? Maybe via .htaccess? Thank you!
Intermediate & Advanced SEO | | Shawn1240 -
301 old site to new site?
I have client with an old site - www.bestfamilylawattorney.com - which had a lot of spammy links (and bad rankings). Instead of fixing those issues, we started a new URL - www.berenjifamilylaw.com - with new content and redesign. Should I do a 301 redirect from old to new domain? If the old site was being penalized, would a 301 transfer that penalty? I just want to make sure I don't end up hurting the new site after doing all the work to start fresh. Thanks.
Intermediate & Advanced SEO | | mrodriguez14400 -
301 Redirect from now defunct website?
Hi guys Quick question about 301 redirection between domains. I currently manage a website, lets call it website A. Website A sells a particular product range, however the decision has been made by the powers that be to pull the plug on the business and sell the products previously sold via Website A via another website within the parent companies control.....lets call it Website B. I need to make it clear to customers of Website A that the company no longer operates but want to pass the SEO equity that has been built up over time to the relevant pages on Website B. My plan was to 1. 301 Redirect all key landing pages on Website A to the most relevant pages on Website B 2. Initially keep the website A homepage live but change the message to say "Website A no longer operates, but Website B can help etc. etc." Remove all sub links from navigation. 3. Monitor referral and direct traffic levels and consider 301 redirecting website A homepage to Website B homepage in the long term. My questions: Does this sound like the best approach? If not, what alternatives are there? Will Website A look like a link farm for Website B? I dont want this obviously!
Intermediate & Advanced SEO | | DHS_SH0 -
Should /node/ URLs be 301 redirect to Clean URLs
Hi All! We are in the process of migrating to Drupal and I know that I want to block any instance of /node/ URLs with my robots.txt file to prevent search engines from indexing them. My question is, should we set 301 redirects on the /node/ versions of the URLs to redirect to their corresponding "clean" URL, or should the robots.txt blocking and canonical link element be enough? My gut tells me to ask for the 301 redirects, but I just want to hear additional opinions. Thank you! MS
Intermediate & Advanced SEO | | MargaritaS0 -
Rel Canonical on Home Page
I have a client who says they can't implement a 301 on their home page. They have tow different urls for their home page that are live and do not redirect. I know that the best solution would be to redirect one to the main URL but they say this isn't possible. So they implemented the rel canonical instead. Is this the second best solution for them if they can't redirect? Will the link juice be passed through the rel canonical? Thanks!
Intermediate & Advanced SEO | | AlightAnalytics0 -
We are changing ?page= dynamic url's to /page/ static urls. Will this hurt the progress we have made with the pages using dynamic addresses?
Question about changing url from dynamic to static to improve SEO but concern about hurting progress made so far.
Intermediate & Advanced SEO | | h3counsel0