How to stop UTM affecting SEO
-
Dear Moz community,
We are a directory website and have lots and lots of UTM. This is crucial as we want to measure visits through Google analytics.
Moz as a tool is fantastic because through a site crawl it can spot all our duplicate pages. Needless to say, due to the amount of UTM's on different pages, we have lots of duplicate pages flagged up. I ideal solution is still having the analytics capabilities of the UTM, but not affecting our SEO where search engines will realise it is not a duplicate page - we're aware it is the same page we just want to track the source!
Your help is greatly appreciated!
Thanks,
Eric -
Eric,
Add the following lines to your robots.txt file and you should be good to go. This will prevent Moz (aka RogerBot) from crawling and reporting on URLs that are tagged with UTMs:
User-agent: rogerbot
Disallow: /*?utmYou should also add self-referring canonical tags on these pages, which will prevent multiple versions of the same page from being indexed. For example:
http://www.yoursite.com/some-page?utm_source=facebook&utm_medium=social should have a canonical tag that looks like this:
-
Hi Logan,
Thank you for the practical suggestions! Will speak to the team about putting these things in action!
Eric