Should I use the FQDN as the "domain" in Django's sites framework? -
i have website request non-www domain i.e. http://example.com
redirected (with status 301) http://www.example.com
server.
if i'm using django's sites
framework, should set domain example.com
or www.example.com
? documents i've seen refer domain example.com
. i'm confused if sites framework refers domain full qualified domain name
or domain name
. django docs define domain "the domain name associated web site". makes me think should without www part. breaks sitemap (django generates urls without www).
the prepend_www
settings reason confusion. appears if django wants define domain example.com
, use setting prepend www
.
it should www.example.com
, canonical url of site. django uses domain amongst other things construct qualified url's, , you'll want these point www.example.com
.
prepend_www
setting return redirect if user visits example.com
instead of www.example.com
. sounds got covered in webserver. doesn't affect domain in other way.
many sites don't use www
nowadays (e.g. www.stackoverflow.com redirects stackoverflow.com), that's reason why documentation uses example.com
.
Comments
Post a Comment