Is it possible to redirect a wordpress.com domain to another domain modifying DNS configuration?
Posted on 08 May 2012 by Tavis.H
The scenario goes something like this. You have been using a service like wordpress.com to host your blog and have even assigned a domain name to point to that service. Now, you have moved your blog to a new host with a new domain, but you still want people who access the old domain to somehow wind up at your new site.
Ideally, you want to make it as simple as modifying the DNS, but that may not be the best option. First, you should understand what you can and cannot do with DNS. The main purpose of DNS is to assign names to IP addresses. Your domain, mywebiste.tld, must be associated with the IP address of a server. The primary record responsible for that association is an “A” record.
If you already have a domain pointing to an IP, you can use CNAME to create an alias, but an alias is different from a redirect. Instead of sending users to the new domain, CNAME will use the old domain to view the same site.
The best option is to use your web server to do an actual redirect that nearly all web browsers should recognize. For example, the Apache web server code for a redirect is 301, and it is universally known by web browsers.
You will still need hosting for the old domain, so make sure your new web host will allow you to host multiple domains. Place an .htaccess file in the root document directory, and put the following information in it:
Redirect 301 / http://www.my-new-website.tld/
This will send users to your new website. You should also put an html file in the same directory in case some users are not redirected, for whatever reason. It should just include a brief statement indicating that the site has moved and a link to the new site. This will also be good for any directories or other services that have indexed your site.
What’s the best service for a low end VPS?
07 May 2012 by Tavis.H