Knowledgebase

DNS for Staging and Development Sites Print

  • dnsnameservers, staging, dns, subdomain, domain, cpanel, ssl, migration, password, cloudflare
  • 0

Separate environments.

THE OPTIONS

A subdomain of your main domain A separate domain A hosts file entry, with no DNS at all

THE SUBDOMAIN APPROACH

staging.yourdomain.com with its own A record and its own cPanel subdomain.

Simple, and it requires protecting so it is neither public nor indexed.

PROTECTING IT

cPanel Directory Privacy, which adds a server-level password prompt.

That also prevents search engines indexing it, which is the other staging problem.

WHY NOT JUST NOINDEX

A noindex tag relies on being read. Directory Privacy prevents access entirely, which is more reliable.

THE HOSTS FILE APPROACH

An entry on your own machine pointing the real domain at the new server.

No DNS change, nobody else affected, and it is how a migration should be tested before switching.

Remember to remove it afterwards. Forgetting means you see the new server indefinitely while everyone else sees the old one.

AT CLOUDFLARE

Set staging subdomains to DNS only. Caching on a staging site causes confusing stale content.

CERTIFICATES

Staging subdomains need coverage too, or you work through browser warnings.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot