I prefer my domains to be naked (as opposed to www.), but I typically redirect all www-traffic in my web server (NGINX). Is this the wrong approach?
I prefer my domains to be naked (as opposed to www.), but I typically redirect all www-traffic in my web server (NGINX). Is this the wrong approach?
The summaries for each side:
[0] https://www.tumblr.com/docs/en/blog_management#customdomain
https://blog.cloudflare.com/introducing-cname-flattening-rfc...
Cookies can be set for specific subdomains only, but if they are set for the "unprefixed" domain they will also be sent for all subdomains (just the nature of how browsers handle cookies).
Since cookie data is rarely needed just to server static assets (images, css files, etc), you can shave off some time on each request if you serve them from a subdomain that is different from the web page's subdomain... but of course your web page has to actually be at a subdomain (e.g. www.example.com) in order for this to work.
Hence, setting up your main web pages to be at a subdomain (such as www.) gives you the ability to then serve static assets from different subdomains without browsers having to send cookie data on each request.
Using `www.example.com` as your cookied domain allows you to avoid sending your cookies to `cdn.example.com`, shaving off a few bytes of incoming bandwidth per request. Whereas if you use `example.com` as your cookied domain, those cookies will be passed to `cdn.example.com`. To avoid that, you'd have to set up your CDN on a completely different domain like `examplecdn.com`.
That's serverside at least, whichi is easily remididied given simple education Much harder is the more than 70% of exotic browsers used by millions; I hate 2345 in particular.
nike.com is obviously a website
nike.shoes isn't - especially depending on the context.
At least www.nike.shoes is recognisable as a URL