One of the first things aimed for and achieved with a web positioning strategy is visibility. We do SEO to show ourselves in a simpler and more effective way to our users and at company level this is essential to connect with our target audience.
Web design affects positioning fundamentally, and greatly. So, use all the SEO techniques you can during the development phase and before finishing the project. At BeDjango we are very aware of this and we want to give you some tips and tools to position your website using Django.
1. Use the redirects app to manage url changes (Django documentation)
Redirects are very important when we move the content of our website from one URL to another, this is good practice if it is desirable to maintain the PageRank and search ranking and other values that make our content special.
Through this transfer of value to the new URL, Google robots and other search engines are able to determine if the new page is related to the old URL. If the context between the two URLs is not the same, then the value will not be redirected since they must be the same.
Adequate implementation of 301 redirects increases the user experience by avoiding a 404 error when entering a page that is unavailable. A 404 error page for a user means that he has found a dead end and must choose a new path. A good option, to prevent these users from leaving our website and never returning, is the use of 301 redirects.
However, beyond improving the user experience, what the 301 redirects are meant to do is tell the search engines that any of the links indexed with the old URL now have a destination in the new URL.
To do this you can use django.http.HttpResponsePermanentRedirect to create a redirect with code 301; this redirect is used just like the standard redirects of Django.
2. Use post save signals to handle slug/url changes in your models
A slug is the part of a URL that identifies a page using human-readable keywords, usually based on the title of the page. For example, the full URL of this publication is: https://www.bedjango.com/blog/4-tips-position-your-website-using-django/
Optimizing URL slugs is not difficult and it is also one of the most important things you should do in the process of optimizing your website. Why?
URL slugs are important for indexing. Indexing is a basic aspect for our web site to be able to be located by search engines, and its content be identified and classified correctly
If the URL of a page is indexed by search engines, we can state that search engines pay attention to URL / - and they do. This brings us to the next point of importance of URL slugs.
Page ranking is how Google evaluates the authority and reputation of your website. A web page with a high page rank value is considered more important and therefore is more likely to appear in the first search results. One of the main functions of a search engine is to rank your results so that the use of keywords in the URL slugs can also act as a ranking factor.
The higher the rank of the page, the higher the probability you will have of appearing higher than your competition in the rankings
To facilitate the use of these slugs we can use post-save signals, which will be in charge of controlling any changes we make on the web and make different modifications. For example if we have a blog and change the title of a post, using a post-save we can automate the slug change according to the title.
3. Use sitemap (The sitemap Framework)
When it comes to improving the positioning of your page, an XML sitemap can be very useful. This protocol allows Google and other search engines to easily understand the structure of your web page when they crawl.
Think of your web page as a house and every page of your web as a room: your XML sitemap would be a flat, so for Google it is easy to quickly and easily find all the rooms in your house
In other words, an XML sitemap will help Google find your pages when crawling your web page. This way, your pages will be classified and not only your web page with your domain. Search engines are informed about the pages on your web page that are available for crawling. While if you do not have an XML sitemap you are not penalized, it is highly recommended, as you can improve your SEO.
To implement this functionality in Django we can use 'The sitemap framework' (https://docs.djangoproject.com/en/1.10/ref/contrib/sitemaps/) that allows us to have a sitemap of our web in a matter of minutes having a basic knowledge about this framework.
4. Use cached template loaders to reduce page load times The Django template language: For Python programmers
The web upload speed is the time it takes to load or display the web in the user's browser. According to Google, the shorter the time it takes to load a page, the better SEO positioning will be. For some time now Google has added this factor in their algorithm to measure the positioning of a website in their search engine. In addition, it is an increasingly important SEO factor, as it improves indexability, rebound rate, conversion of visitors into lead (potential customers) and pay-per-click campaigns. In online business, time is a much appreciated value. It is said that 40% of visitors close a website if it takes more than 2 seconds to load. An instant can translate into profit or loss. Therefore the web loading speed is an essential element to which every company should give the importance it deserves.
Django comes prepared to support different methods to control the cache (Multiple databases, cache based on memory ...) we can extend the configuration by accessing the official documentation https://docs.djangoproject.com/en/1.10/topics/cache/ or using some packages that handle this as http://django-cachalot.readthedocs.io/en/latest/quickstart.html
Given the number of web pages that exist today, however much you are on the internet, if you are not visible there will be no point. And one thing leads to another. More visibility means having more visitors, and increased web traffic means that conversions increase. Whether it's an online store or a news website, your business page will have some goals, which are configured as conversions at the moment they mean that the user performs some action on your web.
In this sense, a good design and web development oriented to conversions will help guide the users navigation to where you want.