Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

In order to position a website project I'm planning on getting 3 domain names (example.com, example.org and example.net).

Whenever a user goes to "example.org" or "example.net" he/she would be redirected to "example.com".

All redirection methods I have used are via JavaScript or PHP and not long ago I found out it can be via DNS settings with the domain registrar company.

Now my question:

Is it a good SEO practice redirecting via DNS? (Would not it be better to have some content on these two websites (".org" and ".net"), like a link pointing to "example.com", and then redirect using JavaScript or PHP?)

In general (considering other topics like security, performance, etc), is it a good practice redirecting via DNS?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

There is no way to redirect via DNS, I detailed the reason in this answer.

What your provider is probably offering you, is a proprietary quick solution to configure a redirect that. Internally, that configuration is converted into a DNS record pointing to a server configured in order to handle the redirect either with a server-side configuration or a script created in a server-side programming language such as PHP or Ruby.

All these server-side solutions (server config, programming language, etc) are totally equivalent as long as they result in a HTTP redirection header set in the HTTP response.

This is the standard way of redirecting, thus it's perfectly fine. In your case, you only need to check whether the response is a 301 response (I don't see the 302 appropriate in your case) and the HTTP headers contain the Location header set to your target domain.

You can check it using any HTTP client, such as hurl.it or $ curl.

share|improve this answer
    
Thank's for your answer Simone. However, you have left me so confused right now XD. I have never used DNS to redirect to another URL, however, on the web there are plenty of info about this topic. You have mentioned many concepts I do not manage that I will have to read about, however I need to ask you one more time: There is absolutely no way to redirect users from myproject.org to myproject.com using only DNS settings? –  Derek Jan 19 at 15:34
    
No, there is not. The DNS protocol don't define anything about redirects, the redirects are defined in the HTTP protocol. In order to redirect, you need to point the DNS to a server and them use the server (either the server config or a script) to return the redirect header. –  Simone Carletti Jan 19 at 17:18
add comment

Your Answer

 
discard

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.