Skip to main content

Google is indexing my 301 redirect pages - How to prevent?

My website has a lot of pages that contain internal links which redirect to external websites.

For example, the content of the page /hello might contain a link to /redirect/123 which returns a 301 HTTP status code with a Location header that points to an external website.

Now, Google has recently started to index tens of thousands of those redirect URLs. This is new though, Google didn't index them before. Any idea on how to fix it?

I previously tried to disallow the pages via robots.txt but that didn't prevent Google from indexes the URLs and Google also doesn't recommend doing that.

I now added a X-Robots-Tag header with the value noindex to the redirects, should that work? Any other ideas?

submitted by /u/cMVjwDjN2OwoJm0DYn86
[link] [comments]

from Search Engine Optimization: The Latest SEO News https://ift.tt/KDntae2

Comments

Popular posts from this blog

Local seo vs. natiowide seo?

I've done SEO for local businesses but I recently got my first client that sells an item nation wide. ​ Any suggestions for doing nationwide SEO? ​ I am used to making geopages for local towns. I was going to do the same with some input from the client about what cities or towns he would like to show up in? submitted by /u/Letmeinterviewyou [link] [comments] from Search Engine Optimization: The Latest SEO News http://bit.ly/2JHy0k0

Clients site has a weird issue with 302 redirects that I haven't seen before.

Site is in Drupal, hosted on Amazon CDN & Cloudflare. So here's a quick breakdown: The site itself works normally. It's a bit dated, but you can click on links and navigate around as you'd expect. Seeing no obvious issues, I run a Screaming Frog crawl to begin my audit. Only 5 pages were picked up by the crawl which was super weird, since all internal links are regular html and there shouldn't be any issues. So I go through the site and manually collect a bunch of URLs, which I submit to SF again as a list. Every single link bar the 5 originally crawled return a 302, with the 'redirect' pointing back to the home page. Except as I said, those pages don't browser redirect. Browser side, they work fine. I guess they redirect the crawl bot though, since the rest of the site is functionally invisible. Other tools I've looked at say that the pages return simultaneous 302 and 200s, which doesn't make too much sense. These 302s are also old enough ...