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

A SSL redirector for shared hosting environments, e.g. Webfaction

Project description

A simple importd based SSL redirector. It accepts requests and redirects to the SSL version of the same page.


I needed something like this for a couple of sites that were hosted on a shared hosting provider but I wanted to only have one process doing the SSL redirects.


Simply run:


This launches ressl on port 8000 using Django’s runserver management command.

For production use it’s strongly recommended to instead use a real WSGI server like gunicorn or uWSGI , e.g.:

gunicorn ressl

To use a different port, use the server’s options, e.g.:

gunicorn -b ressl

You must set at least one envrionment variable for ressl to work: RESSL_ALLOWED_HOSTS. It’s a comma separated list of host names ressl is allowed to redirect, e.g.:,, gunicorn -b ressl

Debugging is done by setting the environment variable RESSL_DEBUG to any value:

RESSL_DEBUG=yep gunicorn -b ressl

If your site runs behind a proxy, you may have to tell ressl how to figure out if a request is SSL or not. Use the RESSL_PROXY_PROTOCOL environment variable to define it (defaults to 'HTTP_X_FORWARDED_PROTOCOL'):



Feel free to open tickets at Say thanks at

Project details

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
ressl-0.2.1.tar.gz (2.5 kB) Copy SHA256 hash SHA256 Source None Aug 14, 2013

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