How do I hide comment reply's from google? Do I need to?
-
Reason for asking is Moz reports them as URL too long. Should these even be indexed by google if not, how do I hide them?
Example URL : https://www.tansleyphotography.co.uk/farnham-castle-wedding-claire-chris/?reply-to=1876
This really doesn't need indexing, as it's just a comment on a blog post. Does it matter?
-
Hi,
The url with the parameter won't be indexed by Google. On that page you have (correctly) got the canonical tag set to "https://www.tansleyphotography.co.uk/farnham-castle-wedding-claire-chris/" so you're telling Google (and all the other search engines) which is the "master" page that you want indexing. Therefore, Google should be fine.
You can tell Moz to ignore them by using robots.txt to exclude them for rogerbot:
User-agent: rogerbot
Disallow: /*?reply-to(Note, that will tell rogerbot to not crawl any URL with "?reply-to" in it, you could use "/*?" if you wanted to block all parameters, which may or may not be desirable)
-
Perfect - thx Alex.