1
votes

I have a redesigned django site which has same url as the previous one. After 2 weeks of launching of the site, the google is still showing old urls and after accessing them, they are giving 404 errors.

I have added the site in Google's webmasters tool and with the help of robots.txt the website was crawled. It started showing some of the new urls in search but after adding sitemap to the tool, no crawling has been done as per the crawl stats and crawl errors reports. I have tested the sitemap and it has submitted around 500 pages but none are indexed so far. I don't know where I am going wrong.

Please guide me.

1
Your question may be better suited to Webmasters, please read their guidelines before posting - Sayse
Thanks, It is useful. I will post this there also. - escapee
@escapee did you post it in Webmasters in the end? - guival

1 Answers

0
votes

Have you pinged Google after the changes? The Django docs have a well explained section on this.

You could even implement it so that Google is pinged each time any change happens relevant to the sitemap:

from django.contrib.sitemaps import ping_google

class Entry(models.Model):
    # ...
    def save(self, force_insert=False, force_update=False):
        super(Entry, self).save(force_insert, force_update)
        try:
            ping_google()
        except Exception:
            # Bare 'except' because we could get a variety
            # of HTTP-related exceptions.
            pass