How to Point Your Domain to Shared Hosting

How to Point Your Domain to Shared Hosting

What Does Pointing a Domain Mean?

When you register a domain and purchase hosting separately, you need to connect the domain to the hosting server.

This process is commonly described as pointing your domain to your hosting account.

DNS is responsible for connecting your domain name with the correct services.

Without correct DNS configuration, your website may not open even though your hosting account is active.

Two Common Methods

There are two common approaches:

  1. Change nameservers.
  2. Keep existing nameservers and change DNS records.

Both methods can work.

The right method depends on where you want to manage your DNS.

Method 1: Change Nameservers

Your hosting provider may provide nameservers similar to:

ns1.example.com

ns2.example.com

You enter these nameservers at your domain registrar.

After the change, DNS management is usually handled by the hosting provider.

This is a simple approach for beginners.

Method 2: Change the A Record

Instead of changing nameservers, you can keep your existing DNS provider and point the domain's A record to the hosting server's IP address.

This is useful when you already manage DNS somewhere else.

For example:

example.com → hosting server IP

You may also need to configure the www record.

Be Careful With Email

This is one of the most important points during a hosting migration.

Your website and email do not necessarily use the same DNS records.

If your email is working correctly, do not blindly delete MX, SPF, DKIM or other mail-related records.

A DNS change intended to move a website can accidentally interrupt business email.

Before Changing DNS

Write down your current DNS records.

Important records may include:

  • A
  • AAAA
  • CNAME
  • MX
  • TXT
  • SPF
  • DKIM
  • DMARC

You may not need to change all of them.

Only change records that are required for the new hosting setup.

Check Your Hosting Account

Before pointing the domain, confirm:

  • Hosting account is active.
  • Domain is added to hosting.
  • Website files are uploaded.
  • Database is configured.
  • SSL is available.
  • Correct document root is selected.

If you point the domain before preparing the website, visitors may see an empty page or hosting default page.

DNS Propagation

DNS changes do not always appear everywhere immediately.

Different DNS resolvers can cache records for different periods based on TTL.

During a migration, some users may temporarily see the old server while others see the new server.

This is normal.

Keep the old hosting active until the new environment is confirmed.

Test the Website

After DNS changes, check:

  • Homepage
  • Important pages
  • Images
  • Contact forms
  • Login
  • SSL
  • www
  • Non-www
  • Email

Do not test only the homepage.

What If the Website Does Not Open?

Check the domain's DNS records first.

Confirm that the domain points to the correct server.

Then check whether the domain has been added correctly inside the hosting account.

Also verify that the website files are located in the correct document root.

What If HTTPS Does Not Work?

If DNS is correct but HTTPS does not work, check the SSL certificate.

The certificate normally needs to be issued for the domain that visitors are using.

For example, test both:

https://example.com

and

https://www.example.com

if both versions are configured.

Final Thoughts

Pointing a domain to shared hosting is mainly a DNS task.

The most important rule is to understand which DNS records are responsible for your website and which ones are responsible for email.

Plan the change, record your existing DNS configuration and keep the previous hosting environment available during a migration.

Frequently Asked Questions

How long does DNS propagation take?

The time can vary depending on DNS caching and TTL values.

Can I keep my email while moving my website?

Yes. Website DNS and email DNS can be managed separately when configured correctly.

Should I change nameservers or A records?

Both can work. Nameservers are simpler when you want the new hosting provider to manage DNS.

Can DNS changes delete my website?

DNS changes do not normally delete website files, but incorrect records can make the website unavailable.

Back to Blog