Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

A Django middleware application that removes the WWW subdomain

Project description

PyPI version Build status

Django Remove WWW is a Django middleware application that removes the WWW subdomain.

The middleware inspects the request’s host for the www subdomain, and redirects if REMOVE_WWW is True. It silently passes if PREPEND_WWW is also True. For some reason, Django won’t include a REMOVE_WWW setting. Thanks to Daniel Ryan’s GitHub Gist for some inspiration.


$ pip install django-removewww

Add to

    # ...


Adding to INSTALLED_APPS is unnecessary unless you want to run the tests.

Release history Release notifications

This version
History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django_removewww-0.1.2-py2.py3-none-any.whl (6.1 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Jul 17, 2017
django-removewww-0.1.2.tar.gz (3.2 MB) Copy SHA256 hash SHA256 Source None Jul 17, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page