homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Search Engines / Sitemaps, Meta Data, and robots.txt
Forum Library, Charter, Moderators: goodroi

Sitemaps, Meta Data, and robots.txt Forum

How to block your 301 redirect from showing up in google.com
301 redirect,

 12:09 am on Dec 16, 2013 (gmt 0)

I would like to do a 301 redirect from an old website of mine to a new one and would like to know the coding that keeps this from showing up in Google? I'm using Wordpress and don't want my competition to be able to see the 301 redirect showing up when they type site:mydomain.com. Any help on this would be great.



 12:21 am on Dec 16, 2013 (gmt 0)

Can't be done. A 301 redirect is, by definition, visible. That's the difference between a redirect and a rewrite. After the redirect has been running for a while, the old URL will drop out of the index.

Now, if you want Site A to show the content of Site B with nobody the wiser, that's a proxy. Whole nother question.

And if you want to show one thing to your competitor and an entirely different thing to a major search engine ... uh ... I think you've come to the wrong forum :(

Edit: A search engine will never show the Redirect response as such. It will show either the new URL or the old one.


 12:43 am on Dec 16, 2013 (gmt 0)

I think I mean by typing in info:mydomain when looking for 301 redirects they all would show up unless they're blocked from showing up or removed from google's index.
There is a code you would put in to block bots like majestic & ahrefs and from seeing your 301 redirects.

All I want is to keep the 301 redirect from showing up from certain bots and from google showing it in their index. Google knows I did the 301 redirect internally but my competition doesn't need to see it. I'm pretty sure there is a php code to make this happen.
I'm not looking to cloak a website.


 3:54 am on Dec 16, 2013 (gmt 0)

welcome to WebmasterWorld, ggman!

when a 301 redirect shows up in Google, what does it look like?
i always thought google wouldn't index a requested url that got a 301 status code response.
are you saying you want google to index the requested url(s) in spite of the 301 response?


 5:35 am on Dec 16, 2013 (gmt 0)

Google knows I did the 301 redirect internally

What do you mean by "internally" here?

I've got a vague notion you don't really mean 301 redirect at all; you're asking about an internal rewrite. A 301 means "If you ask for a particular URL, the user-agent will be told to ask for something else." No way to camouflage that. But the new URL-- whether in the flesh or in a search engine-- won't have a big red label saying "Formerly known as..."

I think I mean by typing in info:mydomain when looking for 301 redirects

Can you say this in different words? I'm not familiar with "info:" as a search element. Casual experimentation suggests that it gives you content of the "description" meta tag-- if there is one-- for the specified page. Which is interesting in its own right, because I had no idea you could do that, but I don't think it's what you meant.

If you type info:example.com/dir/filename.html and it happens to be a recently redirected page, you'll be shown the new URL-- with description, if any. (I am experimenting here on my own site. Beyond a certain age, it doesn't say anything about the requested URL, even if the redirect itself is still active in htaccess.)

Well. That was all extremely fascinating, but probably had nothing to do with your question.

:: wandering off to investigate why google claims never to have heard of one particular URL ::

Global Options:
 top home search open messages active posts  

Home / Forums Index / Search Engines / Sitemaps, Meta Data, and robots.txt
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved