/    Sign up×
Community /Pin to ProfileBookmark

Hi All,

Does a search engine follow a redirect?

I’m experimenting a little with subdomains and redirects, and I need to know whether a search engine will follow a redirect when it starts to index a site.

For example, index.htm in the subdomain test.mydomain.com will have something like this…

[code=html]<head>
<meta httpequiv=’REFRESH’ content=’0; URL=http://www.mydomain.com/index.php?id=112′>
</head>[/code]

The id will tell php which mysql database it should load for that subdomain. Each subsequent page call will also have the id=112.

For it all to work, the search engine would have to follow the redirect. Will it?

to post a comment
SEO

7 Comments(s)

Copy linkTweet thisAlerts:
@grumpyoldtechsNov 11.2006 — wouldn't it be easier to use header("Location: url.com");

from what i've read a search engine doesn't like a page which refreshes under 500 seconds or something.

i think it would look for certain code and also follow the links bots are constantly being updated and becoming more advance
Copy linkTweet thisAlerts:
@chestertbauthorNov 11.2006 — Doesn't header("Location:url.com") simply send a header set that looks something like this...?

<head>

<meta httpequiv='REFRESH' content='0; URL=http://www.mydomain.com/index.php?id=112'>

</head>

That would mean the bot would have to follow it any way.

Or have I misread the nature of the php "header" function?

CTB
Copy linkTweet thisAlerts:
@aidanmackDec 05.2006 — I have a very similar problem.

Our old site uses standard html.

but now our site is database orientated.

when u do a search in google for our site our html pages always come up tops.

what i would really like to do is re-direct from that html to our new spanking php pages.

However am i correct in thinking that if a bot picks up a redirect in the html page it will delete the page from its site database so it wont come up in a search engine anymore??


soooo my other idea was to replace the relevant html in our html page with a i-frame and loaded in our new php files. But then the bots woulnt see the info thats being loaded in to the iframes. so thats a no no.

Soo really what im trying to say is, how do you redirect to another site while keeping the site your redirecting from to the top of a search engine?

what do other people do.

cheers

Aidan
Copy linkTweet thisAlerts:
@manpasandDec 07.2006 — Why don't you use 301 redirect with using .htaccess.
Copy linkTweet thisAlerts:
@chestertbauthorDec 07.2006 — The other option is to use a javascript redirect. That way, the bot will still see your shiny html pages that it's worked so hard to index, so it will retain the ranking for that page.

Something like...
[code=html]<head>
<script language='javascript'>
function redirect()
{
top.location='http://www.yoursite.whatever';
}
</script>
<body onload='javascript:redirect()'>
etc...[/code]


The downside of this is that the entire page will load before it redirects, which means your visitor has to wait.

If you use the iframe route, just have a link on the top page to the content of the iframe. As long as a bot has a link to follow, it will follow it and index that the page. Even if the link is hidden, the bot will follow it without penalty.

You then place the old content within a hidden div. The bot will still index it and retain its ranking because it ignores the dhtml that shows or hides div content. Just remember to replace all your pics with a tiny single pixel image so that your user doesn't have to wait for those pics to load.
Copy linkTweet thisAlerts:
@innomindsDec 07.2006 — I'm also facing the same problem. Earlier i've used a free hosting service(50webs). Right now i've moved to a paid one. How can i redirect the traffic from the old site to the new one. Could anyone explain me?
Copy linkTweet thisAlerts:
@DranowebAug 17.2007 — why are all the topics I find - a year or more old?

Anyway that aside:

As a slight deviation from the topic I have a slight issue with what seemigly should be a basic and straightforward operation.

I have a site (dranoweb com) and have an iframe dead center to load the content.

I'm trying in vain to make the content pages redirect to the main page, (got this bit working ok) and then have the iframe load the page originally intended within the iframe.

I have found a host of codes to do this, but as I have no frameset to speak of, most of the javascripts I have found to do the job, don't work.

Not being very profoicent in javascript - can someone point me in the direction of a thread that may assist?
×

Success!

Help @chestertb spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...