Skip to main content

Enables returning the X-Robots-Tag header based on Django settings.

Project description

Django X-Robots-Tag Middleware

PyPi Package Version Python package codecov Scrutinizer Code Quality Documentation Status

Simple Django middleware to use the X-Robots-Tag header based on a config param.

Installation

From pypi <https://pypi.python.org>

$ pip install django-x-robots-tag-middleware

Usage

  1. Add 'x_robots_middleware.XRobotsMiddleware', to your middleware list in settings.py.

  2. Add X_ROBOTS_TAG = ['noindex','nofollow'] to your settings.py with the settings you want for the X_ROBOTS_TAG.

Details about the values for the tag and what they do can be found in the Google Documentation <https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag?hl=en#using-the-x-robots-tag-http-header>_.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page