Moving subdomain to a different hosting provider

Moving subdomain to a different hosting provider - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the Moving subdomain to a different hosting provider error on your web browser. Problem :


Currently my subdomain is hosted within same webhotel as my main domain. I would like to change it to point another domain (website on Windows Azure). Subdomain should be accessible all the time during transition, from old or new location as long as it is not down.



My webhotel uses DirectAdmin and for subdomain I have A record pointing subdomain to IP address. That A record and subdomain webpage itself was done with "Subdomain Management" tool in DirectAdmin. What is the best way to redirect subdomain to new host? What if I modify .htaccess with redirect to new doamin? Does .htaccess override my A record or would this cause some issues? Any better solutions to transfer the subdomain? Thanks.


Solution :

What you are searching for is known as a CNAME record. With Windows Azure you will be given a public URL for the service usually under a domain associated with Azure. From there you change the current A record to a CNAME record with the same sub domain name and simply add the public domain for the Azure service. What will happen then is when a user tries to connect to the sub domain in question they will get back a response saying that it is a CNAME of the Azure domain and will automatically do a DNS lookup on the Azure domain to get the right IP address. The comment made above talking about getting the machines IP address is a bad idea unless you have had a dedicated IP assigned to it as many Azure endpoints have empherial IP's where the IP address can change over time with little or no notice which would break your site each time it happens, whereas by using a CNAME record the end users browser will always get the correct IP address as of that point in time.


We hope that this article has helped you resolve the web-hosting, htaccess, redirects error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How to redirect to any domain [duplicate]

"302 found" for index page bad for SEO?

Create redirect from url like www.example.us/?p=100&option=