How to redirect (via htaccess 301) multiple TLD's to one website?

Hi all,

I was wondering how I could best do the following redirect:

I have several TLD’s ( / [URL=“”] / [URL=“”] / [URL=“”] / …) and I want to redirect them all (using a htaccess 301) to an existing website [URL=“”]

I know I have to do this with a .htaccess (301 redirect) file, but what I don’t know is how to set the .htaccess file up in Plesk.

Do I:[LIST=1]
[]create one hosting for and put a .htaccess file in the root with the redirects to all other TLD’s.
]create multiple hostings for all TLD’s en create multiple .htaccess files for every hosted TLD.
[*]something else.[/LIST]Thanks for any feedback.


Repeat as necessary. Although I suspect there is a shorter way to write that for multiple domains.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\\.)?old-domain\\.com$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]


You provided a LOT of information but NOT the critical point: WHERE (physically) are all the domains pointing to? If they’re all in the same physical DocumentRoot, your problem becomes simple (and Plesk has NOTHING to do with the solution):

# stymiee was very close!
# .htaccess in SHARED DocumentRoot
RewriteEngine on
RewriteCond %{HTTP_HOST} !^(www\\.)?mydomain\\.com$ [NC]
RewriteRule .?${REQUEST_URI} [R=301,L]

… which will redirect EVERY request make to EVERY domain located in this DocumentRoot to Any query string will be sent along separately (unchanged) but, as with every change in domain (and the PERMANENT redirection), the will be displayed.



stymiee, dklynn, thanks for answering.

dklynn, the nameservers of all domains are pointing to our webserver. ( &
I wonder how can I point all domains to the document root of the main website?


That’s normally a function of Plesk or CPanel or … to add/change the contents of the httpd.conf’s VirtualHost section when you add or modify a domain’s pointer. SOMEWHERE (as above), you will find where to change the DocumentRoot (physical directory pointer for the domain’s root directory) and that’s where you can force your domains to share (or not to share).