• Wednesday, February 25, 2026

Knowledge Base

How www and non-www Versions Work

Understanding www vs non-www

www.example.com and example.com can be the same or different.

Are They the Same?

Technically, they're different addresses. Your server configuration determines if they show the same content.

Hostdeal Default

By default, both versions work and show your website. This is handled automatically.

Choosing One (Recommended)

For SEO, choose one as your "canonical" version:

Redirect www to non-www

Add to .htaccess:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

Redirect non-www to www

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

Why It Matters

  • Consistent branding
  • Better SEO (avoid duplicate content)
  • Cleaner analytics

SSL Considerations

Make sure your SSL certificate covers both versions (Let's Encrypt does this automatically).

Recommendation

Non-www (example.com) is shorter and becoming more common. Either is fine - just be consistent.