This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Django app for Heroku users designed to hide your *.herokuapp.com from search engine results.

Use case

You want to develop a website called artisanalraisinbeer.com using Django deployed on Heroku. You write a little bit of Django code and create a new Heroku app called artisanalraisinbeer to deploy to.

While developing, you can visit your site by going to this URL: http://artisanalraisinbeer.herokuapp.com

Eventually, you finish the first version of your website, buy the domain name artisanalraisinbeer.com, and set everything up so that you can view the site just by going to the following URL: http://www.artisanalraisinbeer.com

You can still visit http://artisanalraisinbeer.herokuapp.com, which is fine—but there’s one problem: you want your main site to show up in search results, not your .herokuapp.com site.

How it works

This app goes about this two ways: robots.txt and the X-Robots-Tag. Why both? To be double-plus sure… :eyes:

If herokuapp seems to be in the originating host of the user request, then we do two things:

  • Put the following in robots.txt:

    User-agent: *
    Disallow: /
    
  • Set X-Robots-Tag in our response header to noindex, nofollow.

For search engines that respect these settings, they should start to ignore these sites in future crawls.

Quick start

  1. Add 'hide_herokuapp' to your INSTALLED_APPS setting.

  2. Add the HideHerokuappFromRobotsMiddleware middleware to your MIDDLEWARE_CLASSES like this:

    MIDDLEWARE_CLASSES = (
        ...
        'hide_herokuapp.middleware.HideHerokuappFromRobotsMiddleware',
    )
    
  3. Include the hide_herokuapp URLs in your project’s urls.py like this:

    urlpatterns = [
       ...
       url(r'^', include('hide_herokuapp.urls')),
       ...
    ]
    

    alternatively, you may hook up the view directly:

    from hide_herokuapp.views import herokuapp_robots_view
    
    urlpatterns = [
      ...
      url(r'^robots\.txt$', herokuapp_robots_view),
      ...
    ]
    
Release History

Release History

0.4

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-hide-herokuapp-0.4.tar.gz (4.8 kB) Copy SHA256 Checksum SHA256 Source Apr 6, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting