Skip to content

Hides default Heroku (*.herokuapp.com) URLs from search engines

License

Notifications You must be signed in to change notification settings

ykessler/hide-heroku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hide Heroku

Hides default Heroku (*.herokuapp.com) URLs from search engines in order to avoid duplicate content issues.

Info

All Heroku apps are accessible via the *herokuapp.com, even after a custom domain is assigned. This introduces the potential for duplicate content issues if search engines index the same content under both custom and default domains.

HideHeroku blocks robots from all content served under the *.herokuapp.com domain, including assets, by issuing 'noindex, nofollow' X-Robots-Tag HTTP response headers on those requests.

More on X-Robots-Tags:

Installation

hide_heroku is Rack middleware that can be used with Rails or any other Rack application.

Add this line to your application's Gemfile:

gem 'hide_heroku'

And then execute:

$ bundle

Or install it yourself as:

$ gem install hide_heroku

For non-rails applications, add this line to the config.ru file:

use Rack::HideHeroku

About

Hides default Heroku (*.herokuapp.com) URLs from search engines

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages