How to Set up Google Search Console for Django

Oct. 13, 2020, 11:35 a.m.
Django SEO · 5 min read
How to Set up Google Search Console for Django
Last Modified: April 5, 2021, 11:20 a.m.

SEO content production can feel like throwing coins down a dark well.

Articles are written with the hope of generating free, organic traffic to your site by appearing on the first page of Google's search rankings.

But how do you actually know your content is ranking, generating traffic, and meeting specific keyword queries on Google search engine results? 

Luckily, Google provides free tools to monitor your Google search rankings and performance.

All you need to do is connect your site to the Google Search Console.  


What is SEO?

Search Engine Optimization (SEO) is the process of optimizing content for search engines to secure a high ranking on specific search terms related to your site.

The question that instantly arises from this definition -- What is my site's ranking?


What is my site's current Google search ranking?

Google search rankings are provided for each page on your site, not the entire site. 

Sign up for Google Search Console, a web service designed to monitor and troubleshoot your site's presence in Google Search results, to view each pages' position for specific queries.


Setting up Google Search Console

Don't be intimidated by the name or features of the service.

Google Search Console is a collection of resources to help website owners view site performance all from a simple dashboard.

It only takes a few minutes to set up.

To set up Google Search Console: 

1.Go to Google Search Console - Go to the Google Search Console welcome page; you will need to sign in with a Google account to proceed.Google Search Console Sign Up


2.Enter the domain you wish to monitor - Click on the "Domain" card, and enter the name of your domain. As the card states, selecting this option will allow you to track all URLs associated with the domain, including subdomains and different HTTP protocols. Verify your website with the custom DNS record


3.Add the TXT DNS record - Now you need to verify that you actually own the domain by adding a DNS record to your domain. A domain name system (DNS) record is how Google will be able to connect to your domain and detail the information associated with your site. To do this, you need to login to the domain name registrar where you purchased the domain (i.e. log into GoDaddy, Google Domain, Namecheap...) and add the TXT DNS record provided by Google Search Console to the list of Host Records. Domain Registrar GoDaddy


4.Verify domain ownership - With the DNS record added, go back to the Google Search Console DNS popup and click the "VERIFY" button. Wait for the Search Console to find the newly added record. It should only take a few seconds, then you can go to the property/domain information.

Immediately after verifying the domain, you are brought to the Overview page that states the message "Processing data, please check again in a day or so".

You are now done setting up Google Search Console, but you still need to adhere to Google's best practices to guarantee your data will be processed correctly. 


Adhering to Google Search Console's best practices

Google Search Console Help Center actually has a guide for beginning users that links to an SEO starter guide.

Within the SEO guide is a link to how to manage your sitemaps and a section on blocking unwanted web crawling with a robots.txt file.

You are going to need both a sitemap.xml and a robots.txt file if you want to see your website data appear in the Google Search Console.

Google SEO Started Guide


Add a sitemap to your Django project

A sitemap is a file located on your website that lists pages on your site.

Google and other search engines read this file to easily locate and crawl the pages you want on Google search results.

Django web framework offers a built-in sitemap-generating framework to create a Django XML sitemap file using Django models. 

Sitemap in Django project

This site map is created using Django models and auto-updates to include model objects as soon as they are added to the site.

Once your sitemap is created, go to the Google Search Console and click on the "Sitemap" tab on the left. There, you can submit your sitemap URL to Google Search Console. 

Add a Sitemap to Google Search Console



Add a robots.txt file to your Django project

Now you need to create a robots.txt file, the file that tells web crawls which pages they can and cannot access.

Follow the tutorial Add Robots.txt to your Django App to learn how to format your file and also connected it specifically to your file. 

Robots.txt in a Django project

robots.txt should include any directories or URLs you do not want on Google search results.

Google Search Console will find this file automatically while scraping your site.


View your Google Search Console performance

It will take Google a couple of days to scrape your site and begin ranking your pages.

In the meantime, to see if your website is even on Google, type in the search bar. 

Google site search results for Ordinary Coders



Once, pages begin to appear on Google Search Console you can select the tab "Performance" and see each page's ranks in terms of queries, pages, devices, countries, and so on.

Google Search Console Performance

Post a Comment
Join the community

Written By
Hello! I enjoy learning about new CSS frameworks, animation libraries, and SEO.