Website reachable with and without www
Make sure your website works on both example.com and www.example.com.
Visitors sometimes type your address with www and sometimes without. Both should work. You arrange this with two DNS records.
Setting it up
- Go to Services → Domains, click the domain and choose Manage DNS records.
- Make sure there is an A record on
@with your web server's IP address. This is the domain without www. - Make sure there is a CNAME record on
wwwwith your domain name followed by a dot as its value, for exampleexample.com..
| Name | Type | Value |
|---|---|---|
@ |
A | 203.0.113.10 (your web server's IP) |
www |
CNAME | example.com. |
Do you have web hosting with Knippin and is the DNS on our hosting server (DirectAdmin)? Then these records are already there.
One canonical version: redirecting
For search engines it is better to have one main version. Choose, for example, https://www.example.com and redirect the other version to it with a permanent (301) redirect.
- WordPress: set the preferred address under Settings → General. WordPress then redirects the other version automatically.
- Other websites on Knippin hosting: set up the redirect in DirectAdmin, or ask us for help via a ticket.
Do not use a CNAME on
@. It is not allowed and breaks your email, among other things.
An SSL certificate for both
Your SSL certificate must cover both example.com and www.example.com. With Knippin web hosting, the server automatically requests the free Let's Encrypt certificate for both addresses once the DNS points to the server.