Welcome to WebmasterWorld Guest from 54.198.46.95

Forum Moderators: open

Message Too Old, No Replies

Multiple domain redirection

How to redirect multiple domains on the same server

     
8:52 pm on Jan 25, 2008 (gmt 0)

5+ Year Member



Hi,

I have various domains all on the same server package. I want to host various websites on this same server package, so i have been told i should make an index file with html redirection code, redirecting each domain to a different file on my server.
The problem is that because each website needs different meta tags, i don't know how to impliment this in the initial index redirection file.
Am worried that the search engines are not going to pick up my websites because the exact meta for them won't be on the index redirection file.
Can anyone help?

Thanks

8:56 pm on Jan 25, 2008 (gmt 0)

5+ Year Member



This is the code i've been given for the redirection index file, will this have a negative effect on my websites coming up in the search engines?

<html>

<head>

<title>Redirect Script with JavaScript</title>

<script language=javascript>

var whois=location+" "

if (whois.indexOf("yourdomain.com")!= -1)

{ window.location ="page1.html" }

if (whois.indexOf("www.yourdomain.com")!= -1)

{ window.location ="page1.html" }

if (whois.indexOf("yourotherdomain.com")!= -1)

{ window.location ="page2.html" }

if (whois.indexOf("www.yourotherdomain.com")!= -1)

{ window.location ="page2.html" }

if (whois.indexOf("subdomain1.yourdomain.com")!= -1)

{ window.location ="page3.html" }

if (whois.indexOf("subdomain2.yourdomain.com")!= -1)

{ window.location ="page4.html" }

</script>

</head>

<body>

</body>

</html>

6:33 am on Jan 26, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Carpaccio, and welcome to WebmasterWorld :)

I want to host various websites on this same server package, so i have been told i should make an index file with html redirection code, redirecting each domain to a different file on my server.

Uhhh...no. Don't do that. It's a horrible idea. And your instincts are right, you will probably have problems with the search engines.

Use virtual domains. A good web server (like Apache, which most hosts run) can handle numerous domains on the same server. You should be able to set up each domain with its own site/directory/folder.

11:41 pm on Jan 27, 2008 (gmt 0)

5+ Year Member



Hi, thanks but how do i set up virtual domains? They are all hosted under a package on a brinkster server at the moment. Is it easy to set up?
Thanks
7:35 pm on Jan 28, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I assume you are using some kind of web-based control panel provided by your host. The method will depend on what control panel you are using. I suggest you consult the documentation.

I could explain how to do it with Apache configuration files, but I doubt you have access to those directly. What will happen in your case is that changes you specify in your control panel will edit those configuration files in a more user-friendly fashion :)

 

Featured Threads

Hot Threads This Week

Hot Threads This Month