Rel canonical with index follow on query string URLs
-
Hi guys,
Quick question regarding the rel canonical tag.
I have lots of links pointing at me with query strings and previously used some code to determine if query strings were in the URL and if they were then not to index that page. If there weren't query strings then the page would be indexed and followed.
I assume I can now use the rel canonical tag on each of these pages so the value goes to the proper URL minus any query string. However do I need to have the rel canonical tag above the index, follow tag on the page?
So URL is site.com/page.html?ref=ABC
meta robots is "index, follow"
Rel canonical is "site.com/page.html"
Does the order of the meta robots and canonical tag matter?
Thanks in advance!
-
Thanks for the responses guys.
@oznappies: I'll have the canonical line at the top for best practices and so it's visible.
@Ryan - My CMS has the option to noindex/nofollow too as there are some pages we don't want indexed. Thanks for the heads up about the WMT/Bing method though.
-
Hi Panini.
The location of the canonical tag does not matter as long as it is somewhere within the tags.
A couple extra notes:
-
the "index, follow" tag is not required. That is the default behavior of crawlers. I would suggest not adding that information as it is unnecessary code
-
you can specify in Google Webmaster Tools how you wish parameters to be treated. From your WMT dashboard > Site Configurations > Settings > Parameter handling tab. Bing has a similar setting in their webmaster's tools section.
-
-
It shouldn't, but I would always place rel canonical as the first line to ensure that it is indexed first and all references are relative to that. This is a developer preference as it is a good design practice. This works on pages we host and create. You should also inform webmaster tool of any parameters you use and to ignore them,even though you have the rel canonical.
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
-
Sudden Indexation of "Index of /wp-content/uploads/"
Hi all, I have suddenly noticed a massive jump in indexed pages. After performing a "site:" search, it was revealed that the sudden jump was due to the indexation of many pages beginning with the serp title "Index of /wp-content/uploads/" for many uploaded pieces of content & plugins. This has appeared approximately one month after switching to https. I have also noticed a decline in Bing rankings. Does anyone know what is causing/how to fix this? To be clear, these pages are **not **normal /wp-content/uploads/ but rather "index of" pages, being included in Google. Thank you.
Technical SEO | | Tom3_150 -
Rel Canonical for Exact Same Copy?
I've read about using rel canonical tags for product pages like "blue shorts" vs "red shorts" but if I have two pages with the exact same copy - different URL's - but same copy, can I use a rel canonical tag and be okay for duplicate content purposes? (There is is reason the page is exactly the same, at least for the time being, so I'm just focusing on how not to be get penalized as opposed to rewriting it at the moment). Thanks, Ruben
Technical SEO | | KempRugeLawGroup0 -
Why are my images not being indexed?
I have submitted an image sitemap with over 2,000 images yet only about 35 have been indexed. Could you please help me understand why Google is not indexing my images? www.creative-calendars.com
Technical SEO | | nicole20140 -
Rel Canonical Crawl Notices
Hello, Within the Moz report from the crawl of my site, it shows that I had 89 Rel Canonical notices. I noticed that all the pages on my site have a rel canonical tag back to the same page the tag is on. Specific example from my site is as follows: http://www.automation-intl.com/resistance-welding-equipment has a Rel Canonical tag <link rel="<a class="attribute-value">canonical</a>" href="http://www.automation-intl.com/resistance-welding-equipment" />. Is this self reference harmless and if so why does it create a notice in the crawl? Thanks in advance.
Technical SEO | | TopFloor0 -
Single URL not indexed
Hi everyone! Some days ago, I noticed that one of our URLs (http://www.access.de/karriereplanung/webinare) is no longer in the Google index. We never had any form of penalty, link warning etc. Our traffic by Google is constantly growing every month. This single page does not have an external link pointing to it - only internal links. The page has been indexed all the time. The HTTP status code is 200, there is no noindex or something in the code. I submitted the URL on GWMT to let Google send it to the index. It was crawled successfully by Google, sent to the index 5 days ago - nothing happened, still not indexed. Do you have any suggestions why this page is no longer indexed? It is well linked internally and one click away from the home page. There is still the PR of 5 showing, I always thought that pages with PR are indexed.......
Technical SEO | | accessKellyOCG0 -
I'm redesigning a website which will have a new URL format. What's the best way to redirect all the old URLs to the new ones? Is there an automated, fast way to do this?
For example, the new URL will be: https://oregonoptimalhealth.com/about_us.html while the old one's were like this: http://www.oregonoptimalhealth.com/home/ooh/smartlist_1/services.html I have redirect almost 100 old pages to the correct new page. What's the best and easiest way to do this?
Technical SEO | | PolarisMarketing0 -
Canonical
I am seeing canonical implementation in many sites for non identical pages. Google honoring these implementation and didn't have any issue. Did anyone have different experience? Thanks.
Technical SEO | | gmk15670 -
Blank Canonical URL
So my devs have the canonical URL loaded up on pages automatically, and in most cases this gets done correctly. However we ran across a bug that left some of these blank like so: Does anyone know what effect that would have? I am trying to provide a priority for this so I can say "FIX IT NOW" or "Fix it after the other 'FIX IT NOW' type of items". Let me know if you have any ideas. I just want to be sure I am not telling google that all of these pages are like the home page. Thanks!
Technical SEO | | SL_SEM0