views:

63

answers:

3

There is a new domain, let's say va.in.

Content is being prepared for the sub-domain a.va.in

The idea is that va.in/index could contain pointers to various sections sometime in future (e.g. b.va.in, c.va.in etc.). As of now, it does not make sense to have such a page as there is just one section i.e. a.va.in

  1. If I decide to re-direct va.in to a.va.in for now, will the search engines follow the re-direct and index the site?

  2. Is DNS the best place to do the re-direction?

A: 

Yes, the search engines follow redirects, if you redirect with a HTTP header

header ('HTTP/1.1 301 Moved Permanently');
header ('Location: '.$location);

I don't know about DNS redirect, but I'd rather not use it..

You can read more about how to do a HTTP redirect here.

evilpenguin
A: 

You can redirect in two ways.

  1. Programaticlally as evilpenguin said
  2. Using the webserver (Example iis)

But there is one thing common in both these options. The redirect must be permanent redirect if you want to inform search engines that va.in is permanently moved to a.va.in

If you dont specity permanent redirects, still crawlers will go to a.va.in but in this case they wont be notified that it is a permanet redirect.

If some one has bookmarked va.in and in the first case (permanent redirection) bookmarks will get updated. But in the second case book marks wont be updated.

Hope this helps.

Shoban
+1  A: 

Using "301 Moved Permanently" search engine will only index sub-domain a.va.in. If that's ok, you can do this using web server's config.

For example in Apache:

<VirtualHost va.in www.va.in>
Redirect permanent / http://a.va.in/
</VirtualHost>


You can't really use DNS to do redirect, because in DNS you cannot assign CNAME to @. See: http://stackoverflow.com/questions/655235/is-root-domain-cname-to-other-domain-allowed-by-dns-rfc

There is question related to yours: http://stackoverflow.com/questions/681869/301-redirect-vs-dns-change-is-it-ever-safe-to-kill-a-301-redirect-and-update-the

vartec