Welcome to WebmasterWorld Guest from 18.206.15.215

Forum Moderators: phranque

Message Too Old, No Replies

Is this redirect for website okay for search engines?

     
4:12 pm on Aug 27, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 31, 2001
posts:69
votes: 0



Hi,

I'm just wondering is the code below okay for search engines? I have been in touch with our hosting company and this is what they implemented as a redirect. I have read in these forums that a 301 would be better but not sure if this can be implemented and i don't know enough about it to talk to them. I have read some of the other threads but still not sure. Basically it used to be a site with 5 hotels on it and now each hotel has its own URL. So we want to redirect the old URL's to the new ones. Currently our hosting company is using the code below for each of the individual hotel URL's (so www.company.ie/hotel.html is now re-directing to www.hotel.com) while www.company.ie is pointing to www.company.com.

This is what our hosting company said, so it actually isn't a re-direct but rather just pointing the IP address to the new url...
"The IP address of old www.company.ie domain name has been changed to point to our server."

I am even confused so I'm sure this doesn't make too much sense to anyone else ;-)

So basically, to make matters easy, my only question is whether the code below is okay for search engines (not ideal i know, but okay)?

Thank you,

ck

<html><head><title>Object moved</title></head>
<body>
<script language="javascript" type="text/javascript">
setTimeout("goHotel()",2000);
function goHotel()
{
top.location.href = "http://www.company.com";
}
</script>
<h1>Object Moved</h1>
This object may be found at <a href="http://www.company.com/">http://www.company.com/</a>.
</body></html>

4:20 pm on Aug 27, 2002 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 27, 2001
posts:12172
votes: 61


Hello charliek. My understanding is the only correct way to redirect old to new is using the 301 redirect method which is done either through IIS on a Windows box or htaccess on a UNIX.

I can't offer any advice on the javascript redirect but my gut feeling is that it is not good. Unless that spider gets a 301 Permanently Moved error, me thinks there may be trouble looming ahead, not sure though.

5:12 pm on Aug 27, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 31, 2001
posts:69
votes: 0



Thank you pageoneresults!

Don't suppose you could point me to a resource that would tell me how to set up a 301 redirect for Windows/UNIX or should i find out from the hosting company what server they use?

I had the code for ASP sites, as we used it on our old site when redirecting, but there is different code depending on the server i think. This might be a good place to set up a little 301 redirect resource for different servers?!?!

any contributions ;-)??

7:25 pm on Aug 27, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 21, 1999
posts:2141
votes: 0


It sounds to me as if your confusion stems from having a lot of info mish-mashed together... Hopefully, I can clarify some of it for you.

If you are hosted on a *nix server, you would need to add directives to the .htaccess file to redirect. If you use IIS, the process would be totally different. Unfortunately, I'm not familiar with it, although there are posts here at WebmasterWorld discussing how to do it.

BUT, I don't think you need to do anything because:

This is what our hosting company said, so it actually isn't a re-direct but rather just pointing the IP address to the new url...
"The IP address of old www.company.ie domain name has been changed to point to our server."

It sounds as if your hosting company has updated your DNS records to associate both your old and new domain names with your IPs, and then added a Java redirect to the old domains so visitors to the old pages are forwarded to the new pages.

If the DNS records are updated as I suspect, every thing is handled! It will take a few days for these records to propagate through all of the many DNS servers around the world but after that, any request to either the old or the new domain name will send visitors (and spiders) to your new domains just as you want, and there will be no more vists to the pages with the Java redirect.

FYI, it's my understanding that most SEs ignore everything enclosed in <script></script> tags. I'd have used a "meta-refresh" tag in the <head> section of the redirect pages. It's a much more simple and reliable way to accomplish the same thing.

10:58 am on Aug 28, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 31, 2001
posts:69
votes: 0


Hi there,

"It sounds as if your hosting company has updated your DNS records to associate both your old and new domain names with your IPs, and then added a Java redirect to the old domains so visitors to the old pages are forwarded to the new pages.

"If the DNS records are updated as I suspect, every thing is handled! It will take a few days for these records to propagate through all of the many DNS servers around the world but after that, any request to either the old or the new domain name will send visitors (and spiders) to your new domains just as you want, and there will be no more vists to the pages with the Java redirect."

Yes thats exactly what they have done! However I don't think everything is handled because I think we still should be using a 301 redirect. Some of the URL's on the old site are indexed and appear in engines and directories as company.ie/hotel/index.html. And these are going to the new site which is what we want. But do I not want to tell the search engines not to bother indexing the old URL anymore as well? Will they not keep indexing it unless there is a 301 error message to tell it that this URL has permanently moved?

Thanks for your help.

2:16 pm on Aug 28, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 21, 1999
posts:2141
votes: 0


I gave this some additional thought last nite charliek.
But do I not want to tell the search engines not to bother indexing the old URL anymore as well?

You are correct. If you don't, you will have the same content indexed for both domains and both may be dropped by some SEs.

I see two possible solutions:
1. Retain your present setup for a month or two, until after your new domains have been spidered by most SEs, then ask your host to return a 404 at the old domains. Your 404 page should include a redirect to the new domains for your visitors benefit.
2. Insist that your host setup a 301 redirect from the old domains to the new ones. This could force you to retain ownership these old domain names indefinately, that may not be an issue for you.

I have several three-four year old pages with 301s that are still indexed and still send traffic from some of the less important SEs so I favor the first approach.

No matter which approach you choose, you WILL struggle with SE listings and reduced traffic for a few months!

2:54 pm on Aug 28, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 31, 2001
posts:69
votes: 0


Thanks Dave. I think solution 1 sounds good too!

all the best