• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 359
  • Last Modified:

DNS Records for Hosting Website on different Hosting Company

Scenerio:
- I own domain example.com on Hosting Company A and my mail (pop3) and other services point to this domain.
- Web Developer is redoing my website but wants it to be hosted from Hosting Company B which is one he likes and uses normally.
- Question, what DNS Records do I need to create at Hosting Company A to facilitate hosting ONLY my website on Hosting company B. So that if someone goes to example.com and www.example.com it will go to the new website.
- I figure I'll use A Records with one being a "A" record for www.  The issue I'm thinking of is how to make example.com work without using a @ or <blank> A Record. I would rather not use this because because if someone types in a random subdomain like random123.example.com I want it to stay at  Hosting Company A and not go to Hosting Company B.
0
ozgc
Asked:
ozgc
1 Solution
 
Frosty555Commented:
The "@" or "blank" record just defines where the top level domain name will point, e.g. "example.com". Under normal circumstances, attempting to resolve a random subdomain like random123.example.com that is not defined in the DNS should return an "NXDOMAIN" error - no domain name found, and address resolution just fails.

It's up to the hosting provider to decide if they will implement a "catch-all" or "wildcard" A record for you, and if so what that address will be. Sometimes you can configure it, other times you can't... it depends on the hosting provider and the interface they provide. In cPanel WHM, for example, you can create a record called "*", which will be a catch-all DNS record.

So you're pretty much bang on with how you are planning on doing it.

The main snag you might run into is that when you change where the "@" record points for example.com, you must then go into the rest of the DNS records and make sure you fix any records that referenced @ to instead explicitly point to Hosting Company A's server.

Many hosting companies will use the same server for the webserver, mailserver, etc. and instead of explicitly specifying the same IP address over and over for all of the records, they will simply point it to "@". If your DNS records are set up that way, you'll have to make sure to change them so that the various "mail" related records such as the MX records, and the various A records like "mail", "pop", "smtp" etc. explicitly pointing to Hosting Company A's Mailservers, and not just referencing the "@" record.

Aside from that, you can change the "@" and "www" records to point to Hosting Company B's webservers, and you should be good to go.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Protect Your Employees from Wi-Fi Threats

As Wi-Fi growth and popularity continues to climb, not everyone understands the risks that come with connecting to public Wi-Fi or even offering Wi-Fi to employees, visitors and guests. Download the resource kit to make sure your safe wherever business takes you!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now