Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

301 redirect domains to subpages

301 redirection of multiple domains to subpages of site

9:54 pm on May 2, 2006 (gmt 0)

New User

10+ Year Member

joined:Dec 16, 2004
votes: 0

I'm needing some advice on 301 redirection of multiple domain names to subpages of my main website.

Here's the situation, I have a domain -


I now also have 3 extra domains which need to 301 redirect to subpages of example.com, eg

subsite1.com --> example.com/subsite1.html
subsite2.com --> example.com/subsite2.html
subsite3.com --> example.com/subsite3.html

I'm just not sure how I should go about doing this without setting up 3 extra domain accounts on my server, and placing a seperate 301 redirect in the root of each?!

1:00 am on May 3, 2006 (gmt 0)

Full Member

5+ Year Member

joined:May 3, 2006
votes: 0

For my site, I found that Apache's mod_rewrite function set did the job.

I have two domains and a host-provided subdomain. Using the RewriteCond and RewriteRule functions in my top-level .htaccess file allowed me to force a redirect whenever a visitor was trying to see my site using any URL other than my preferred one.

You ought to be able to use the same functions to alter the URL that your visitors go to. You can even use mod_rewrite to silently modify the URL that pages are fetched from, without causing the user's browser to redirect.

However, mod_rewrite must be compiled into Apache for you to use it, and it's not a simple set of functions. Make sure you read all about it before you edit your .htaccess file. (Of course, if you have access to the server config files, you'll edit those instead.)