Is rel=canonical needed for URLs with Google Analytics query strings?
-
If a page URL has Google Analytics query strings, does the page need a canonical tag? e.g.,
something.com/?utm_source=newsletter&utm_campaign=mar-2013-nsl
I have rel=canonical on all our pages because some of them will be accessed via URLs that have non-Google strings. The strings are only for marketing purposes, not for identifying a specific page to display. e.g.,
Should I only implement the canonical tag on the pages that might have non-Google marketing strings in the URL?
-
Another vote for proactively adding canonical tags to all pages. They're a great preventive measure in case someone else links with unusual parameters.
Also, Google is "supposed" to understand the UTM tags and ignore them, but we've all seen cases where Google's actual processes don't work quite like they're supposed to. (I've seen plenty of utm-tagged URLs indexed in Google)
(Plus, there's even less guarantee that other search engines would discount them and avoid dupe content. Bing et al may not be a huge traffic source on your site, but no sense throwing it away unnecessarily.)
Paul
-
Agreed. It can only help to set canonical. Google is smart enough to figure out to discard those parameters, as they are their own parameters. But you could also set those parameters to be ignored in GWT.
-
I would add them every page on your site, because pages with query parameters can get indexed by Google. Even if you don't use any parameters yourself, other sites can tack them onto your URL. Best to be safe and add them to all pages.
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
-
Should I canonicalize URLs with no query params even though query params are always automatically appended?
There's a section of my client's website that presents quarterly government financial data. Users can filter results to see different years and quarters of financial info. If a user navigates to those pages, the URLs automatically append the latest query parameters. It's not a redirect...when I asked a developer what the mechanism was for this happening, he said "magic." He honestly didn't know how to describe it. So my question is, is it ok to canonicalize the URL without any query parameters, knowing that the user will always be served a page that does have query parameters? I need to figure out how to manage all of the various versions of these URLs.
Technical SEO | | LeahH0 -
Google is indexing bad URLS
Hi All, The site I am working on is built on Wordpress. The plugin Revolution Slider was downloaded. While no longer utilized, it still remained on the site for some time. This plugin began creating hundreds of URLs containing nothing but code on the page. I noticed these URLs were being indexed by Google. The URLs follow the structure: www.mysite.com/wp-content/uploads/revslider/templates/this-part-changes/ I have done the following to prevent these URLs from being created & indexed: 1. Added a directive in my Htaccess to 404 all of these URLs 2. Blocked /wp-content/uploads/revslider/ in my robots.txt 3. Manually de-inedex each URL using the GSC tool 4. Deleted the plugin However, new URLs still appear in Google's index, despite being blocked by robots.txt and resolving to a 404. Can anyone suggest any next steps? I Thanks!
Technical SEO | | Tom3_150 -
Top Landing Page has disappeared from Google Search Console but still shows at the top of Google
Hi, One of the top landing pages in my website has disappeared from GSC Search Analytics results. But I do get a good traffic from that page until now. What might be the reason for GSC to stop showing it on the results?
Technical SEO | | eduapps0 -
Canonical URLs on location based offers
hello world. i offer first aid courses in different locations in switzerland. now i'm not sure if i have to make the single registration pages rel="canonical" or not. example:
Technical SEO | | alekaj
location 1 -> course list @ Nothelferkurse Thun
location 2 -> course list @ Nothelferkurse Bern the content is almost the same. how do i have to handle with it? thanks for your help!2 -
How to Remove Old Comment Page Query String URLs
I used to use a comments program on my website that created comment pages in the form of http://www.example.com/web-page.htm?comm_page=2. When I switched to a new comments program, I worried that these old comment URLs would be considered duplicate content. I created a 301 redirect that, for example, would redirect http://www.example.com/web-page.htm?comm_page=2 to http://www.example.com/web-page.htm and disallowed them in robots.txt, which I later learned was not the thing to do.. I have removed the URLs from being disallowed in robots.txt. However, many months later, these comment page URLs keep appearing in Google's index from time to time. I use the "Remove URLs" tool in Google Webmaster Tools to remove the URLs from Google's index, but more URLs appear a few days later. How can I get rid of these URLs for good? Thanks!
Technical SEO | | MrFrost0 -
Rel="canonical" of .html/ to .html
Hi, could you guys confirm me that the following scenario is completely senseless? I just got the instruction from an external consultant (with quiet good SEO knowledge) to use a rel="canonical" for the following urls. http://www.example.com/petra.html/
Technical SEO | | petrakraft
to
http://www.example.com/petra.html I mean a folder petra/ to petra is ok - but a trailing slash after .html ??? Apart from that I would rather choose a 301 - not a rel canonical. What is your position here?0 -
Rel Canonical errors after seomoz crawling
Hi to all, I can not find which are the errors in my web pages with the tag cannonical ref. I have to many errors over 500 after seomoz crawling my domain and I don't know how to fix it. I share my URL for root page: http://www.vour.gr My rel canonical tag for this page is: http://www.vour.gr"/> Can anyone help me why i get error for this page? Many thanks.
Technical SEO | | edreamis0 -
Query String Redirection
In PHP, I'm wanting to store a session variable based upon a link that's clicked. I'm wanting to avoid query strings on pages that have content. My current workaround is to have a link with query strings to a php file that does nothing but snags the variables via $_GET, stores them into $_SESSION, and then redirects. For example, consider this script, that I have set up to force to a mobile version. Accessed via something like a href="forcemobile.php?url=(the current filename)" session_start(); //Location of vertstudios file on your localhost. Include trailing slash $loc = "http://localhost/web/vertstudios/"; //If GET variable not defined, this page is being accessed directly. //In that case, force to 404 page. Same case for if mobile session variable //not defined. if(!(isset($_GET["url"]) && isset($_SESSION["mobile"]))){ header("Location: http://www.vertstudios.com/404.php"); exit(); } //Snag the URL $url = $_GET["url"]; //Set the mobile session to true, and redirect to specified URL $_SESSION["mobile"] = true;header("Location: " . $loc . $url); ?> Will this circumvent the issue caused by using query strings?
Technical SEO | | JoeQuery0