https://github.com/macropin/django-googlebot
Django middleware to allow googlebot to index logged-in accessible content.
https://github.com/macropin/django-googlebot
django googlebot python
Last synced: 10 months ago
JSON representation
Django middleware to allow googlebot to index logged-in accessible content.
- Host: GitHub
- URL: https://github.com/macropin/django-googlebot
- Owner: macropin
- License: bsd-3-clause
- Created: 2012-05-18T05:43:30.000Z (about 14 years ago)
- Default Branch: main
- Last Pushed: 2022-06-22T01:03:26.000Z (about 4 years ago)
- Last Synced: 2023-03-12T02:32:46.217Z (over 3 years ago)
- Topics: django, googlebot, python
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 10
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Django middleware to allow googlebot to index logged-in accessible content
Django Middleware to allow Googlebot access to paywalled, or login only content.
This Django middleware automatically logs in Googlebot as the _googlebot_ user.
## Install
Add to your system / virtualenv:
pip install git+git://github.com/macropin/django-googlebot#egg=django-googlebot
Add to Django _settings.py_:
MIDDLEWARE_CLASSES = (
...
'googlebot.middleware.GooglebotMiddleware',
)
Finally, create a _googlebot_ user. This account will be used when Googlebot is automatically logged in.
If you don't create an account, then one will be created automatically.
NB If you wish to disable the Google Cache feature, create a _robots.txt_ with _Noarchive_ . Eg:
User-agent: *
Disallow:
Noarchive: /restricted-content/