Setting up Google Webmaster Tools with Python / Django

Rich Jones

by Rich Jones

Feb 14, 2012


This a short guide on how to set up Google Webmaster tools for your python django website.

Getting Started

To start, go to Google Webmaster Tools and click 'Add A Site.' It's a red button that looks like this:

Python Webmaster Tools

Enter the URL of your website. You'll be taken to a screen with a list of instructions. In the first instruction, there is a link to an HTML file. Download it somewhere.

Inside the HTML file, there will be a string of text that says something like 'google-site-verification: googlea14532fb912s486.html'

Copy that text, and then, in your Django project's urls.py, add this line:

with the strings are replaced with your values. If you need to, refresh your server.

Finishing Up

Then, go back to Webmaster Tools and press 'Verify'. Hooray! Now you've got access to Webmaster Tools and all it's linky goodness.

Bonus! You can use this for your robots.txt:

This will grant robots permissions to crawl your entire website!


Need a Hacker?

gun.io is where top developers find gigs. Bad developers are screened out, so you'll only hire great hackers at gun.io.

Pssst! Hackers, sign up here!


Comments

About gun.io

We match top developers with high-quality freelance and full-time jobs.

Lead DevOps Engineer

PayPerks

New York

Frontend Developer

ParkWhiz

Chicago

Sign up with GitHub and we'll match you with great gigs based on your open-source portfolio!

blog comments powered by Disqus