Short answer: either will do, and the choice is mostly a matter of taste. What is not a matter of taste is picking just one, making the other redirect to it with a 301, and always using the one you picked (business cards, social networks, e-mail signature, WordPress settings). If you do not, you have the same site at two addresses, and to Google that is two sites.
Side by side
|
With www (www.asuaempresa.ao) |
Without www (asuaempresa.ao) |
| Looks |
Longer, but everybody recognises it as a website address. |
Shorter. Looks good on a card, an advert, a social profile. |
| In DNS |
www can be a CNAME record, pointing to another name. |
The bare domain is, as a rule, an A record. A CNAME at the top of the zone is normally not allowed, because other records (MX, NS) already live there. Some DNS providers, such as Cloudflare, work around this. |
| Third-party services |
Easier: many ask for a CNAME on www. |
Sometimes needs an extra step, such as an A record with the address they give you. |
| Subdomains and cookies |
Helps keep the main site apart from subdomains (shop, blog). |
Cookies set for the whole domain travel to every subdomain. |
E-mail does not depend on this choice: the address ana@asuaempresa.ao works the same, with or without www on the site.
How to do it, in five steps
| 1 |
Choose. Rule of thumb: if you use an outside service that asks you for a CNAME, or have several subdomains, stay with www. In every other case, pick the one already on your cards, links and social profiles: changing what is already out there costs more than any theoretical advantage.
|
|
| 2 |
Make sure both names answer. Both have to exist in the DNS zone, and the free certificate normally covers both (check under SSL/TLS Status in cPanel). Editing the zone is covered in DNS records explained.
|
|
| 3 |
Make the other one redirect to the one you chose. In cPanel, the Redirects tool (under Domains) has an option to redirect with or without www and writes the rules for you. In a file, the pattern is in .htaccess for PHP projects. The redirect has to be a 301: 301 or 302.
|
|
| 4 |
Set WordPress to match. Under Settings › General, the WordPress address and the site address should be the chosen one, with HTTPS: changing the site address.
|
|
|
Do not switch from one to the other later without redirects. For Google, every address on the site changes at once, and anyone who had saved or shared a link lands on an error. If you have to switch, put the 301 from one side to the other and keep it for a long time.
|
To see which of the two wins today, type both into the browser and see which address the bar ends up on. In a terminal, curl -I followed by each address shows the code and the destination. If both answer 200, both are alive and the redirect is missing.
|
RECOMMENDED PRODUCT Web hosting with cPanel Domain and SSL included, daily backups and the panel you already know. from $6.59/mo (3-year plan, with coupon) See plans |