Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

This question already has an answer here:

I am not experienced technical person, and still learning but will try to explain what I have done so far and what my query is.

I have a (hypothetical) domain

On that domain I have 3 subdomains:

Each of them have 301 header redirections as follows: -> -> ->

So I can maintain only one unique HTML document (that appears to be three different paths) I have setup .htaccess to use MOD_REWRITE as follows: -> -> ->

This is so far the existing structure.

I have recently purchased three (hypothetical) keyword rich domains:

What I would like to achieve is to have these three domains pointing as following: -> -> ->

The only tricky thing I can't figure out is how I do that so that from a Google SEO point of view, it does not use 301 redirects, no frame. What I mean is that I want the response sent to the browser not to be a 301 redirect and no jump of url in the adress bar of the browser.

I would like to show to visitors (and especially Google bots) as a standard website (with no funny JavaScript, links, 301 redirect, frames etc).

Some of you might scream "duplicate content" but the websites, although using the same index.php are very different.

I am also aware that this could be seen as doorway but these new purchased domains really define (with keywords) my products and what the different websites are about.

Any idea? Any more details, please ask...



share|improve this question

marked as duplicate by John Conde Feb 28 '13 at 0:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

You already asked this question nearly verbatim:… If you aren't happy with the answers your received, edit that question to improve it. – Stephen Ostermiller Feb 27 '13 at 18:13

1 Answer 1

That is not a redirect but a rewrite.

If you are Apache this is done with the .htaccess file. There are many online resources to explain how they work and many relevant questions here.

The principal for having 3 domains share the files is to first create 3 virtual servers which all point to the same document-root. Then you setup the .htaccess file to do the rewriting. It will look something like this:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^$
RewriteRule ^/?(.*)$ /$1/?city=london [QSA]

RewriteCond %{HTTP_HOST} ^$
RewriteRule ^/?(.*)$ /$1/?city=paris [QSA]

If you have sub-pages you may need to tweak the rules depending on how they are structured.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.