To connect your domain to an external hosting provider, you typically have two main methods: updating nameservers or creating A records and other DNS records. Here’s a step-by-step guide for both methods:
Method 1: Update Nameservers (Preferred Method)
-
Get Nameservers from Your Hosting Provider: Most hosting providers provide nameservers like
ns1.hostingprovider.com
andns2.hostingprovider.com
. Check your hosting account dashboard or contact support to obtain these. -
Log into Your Domain Registrar Account: Go to the website where you registered your domain (e.g., GoDaddy, Namecheap).
-
Find Domain Settings: Look for "My Domains" or "DNS Settings" and select the domain you want to connect.
-
Update Nameservers: In the Nameserver settings section, replace the current nameservers with the ones provided by your hosting provider.
-
Save Changes: Confirm and save. Changes can take up to 24-48 hours to propagate, though often it’s faster.
Method 2: Use A Record and CNAME Records (If You Prefer to Keep DNS with Your Registrar)
-
Get the IP Address from Your Hosting Provider: In your hosting account, find the IP address for the server where your website is hosted.
-
Log into Your Domain Registrar’s DNS Management: Go to your domain settings and find the DNS settings or "Manage DNS."
-
Add an A Record:
- Host/Name: Enter "@" (or leave it blank, depending on your registrar) to indicate the root domain (e.g., yourdomain.com).
- Type: Choose "A" for the record type.
- Value/Points to: Enter the IP address from your hosting provider.
- TTL: Set to the default or 1 hour.
-
Add a CNAME Record for the WWW Subdomain (Optional):
- Host/Name: Enter "www."
- Type: Choose "CNAME."
- Value/Points to: Enter your root domain (e.g.,
yourdomain.com
). - TTL: Set to the default.
-
Save Changes: Save these DNS record settings. It can also take up to 24-48 hours for the DNS changes to propagate.
Which Method Should You Choose?
- Nameservers: Best if you want to manage everything through your hosting provider.
- A Record: Good if you want to keep your domain management with your registrar.