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

I own 2 domain names "" and "", I want to redirect to using DNS (preferably). Can anyone assist (I am an amateur at domain management)?

share|improve this question
Depends on your registrar, and may require premium DNS. Email them. – Simon Hayter Apr 12 '13 at 9:08
@byde: What's "premium DNS" in this sense? AFAIK DNS cannot handle subdirectories/paths. So this is not possible using DNS alone. – w3d Apr 12 '13 at 9:57
It is possible, checkout sorry my 1st comment was brief. – Simon Hayter Apr 12 '13 at 22:55

2 Answers 2

You can use a simple redirect pointing to

In order to do this open your public_html folder. You will see a .htaccess file present under the public_html folder.

Add this code in the .htaccess file:

RewriteCond %{HTTP_HOST} ^subdomain\.domain\.com
RewriteRule ^(.*)$$1 [R=301]
share|improve this answer
I do not have access to htaccess because I only own the domain for that, which is why I am searching for DNS configuration. +1 for the answer though. :) – anonymuz Apr 12 '13 at 7:45
@Vivin: so you have a DNS entry for, a DNS entry for, and a server handling requests for – Ulrich Schwarz Apr 12 '13 at 10:46
@Vivin: You can contact your domain registrar for domain1 and ask them to point or redirect your domain name to the desired web address and yes this can be done. :) You can do this yourself if you have been provided a domain management panel by your current registrar which provides the redirection feature. – Nilabh Apr 12 '13 at 17:14

Some premium dns providers provide extra features at dns level such as Dyn do.

Quote on Dyn's Webhop service

Redirecting a Subdomain to a Subdirectory

EXAMPLE redirects to

In many instances, you may wish to redirect from a subdomain (e.g. to a subdirectory of your main site (e.g. While creating a WebHop redirect is a simple enough solution, a better solution is to use either virtual hosting or a 301 server-side redirection instead..

While the quote isn't a 100% match it should in theory and gives you an idea that 'somethings' can be done at dns level, however they do advise that this should ideally be done at hosting level, if you do consider this a viable solution ensure you question them beforehand as I do not have firsthand experience but have heard of others doing it a similar way.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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