You type:
example.com
It works.
Then you type:
and the website disappears.
This is usually a DNS configuration issue.
The Root Domain and www Are Different Hostnames
These are separate DNS names:
example.com www.example.com
You can configure them to point to the same application, but DNS needs to know where each one should go.
Common Setup
For example:
@ → A record → server IP www → CNAME → example.com
The exact configuration depends on your DNS provider.
Don't Forget SSL
Both hostnames also need to be covered by your SSL configuration.
A website may load over HTTPS on one hostname while the other produces a certificate warning if it isn't configured correctly.
Test Both
Whenever you connect a custom domain, test:
https://example.com https://www.example.com
Also check the HTTP versions if your application should redirect them to HTTPS.
DNS Propagation Can Take Time
After changing DNS, different resolvers may temporarily return old information because of caching.
Don't assume a single computer's result represents the entire internet.
Keep One Canonical Domain
Choose whether your application should primarily use:
example.com
or:
Then redirect the other version.
Hostwares supports custom domain configuration, DNS verification, and SSL setup as part of its platform.
A domain is not one address. Check every hostname your users can enter.