CheapWindowsHosting.com |One of the big benefits of using an existing system such as WordPress or Magento, is many things simply come out of the box. One of these things is being “SEO – friendly”: being optimized for the search engines.
Note: While not all WordPress installations are perfect for SEO, it’s usually really good compared to custom installations.
When you’re working in ASP.NET MVC, chances are you’re dealing with a custom solution. That is great; it just means we have to do a lot of things on our own. In this post I will go through the most important elements. However, SEO changes all the time and we don’t really know what triggers Google – so it’s worth continuing your research afterwards to find out if there are things that are forgotten.
I decided to split the changes into “Required”, “Important” and “Nice to have”. What category I placed them in is a bit random and based on my own experiences and what I’ve read – but use it more as a general guideline.
Note: If you Google “Angular SEO friendly” you will get plenty of methods on how to do this in practice.
One of the most important ranking factors is the <title> tag in the header. Make sure to set a unique one for each view in your application – also small pages such as contact and about.
For dynamic pages this is the most important, as you would often have your main content there.
Sitemaps are important to tell the search engines exactly what pages you have. Unfortunately you have to make them yourself.
Each page, when fully rendered, should only have a <h1> tag. The <h1> tag is what the page is about, and should be the main headline.
It’s in general a very good idea to put a canonical URL on most views. The idea is you tell Google what the real version of the URL is.
A typical example is you have the same page that gets indexed with unique query strings:
The idea is you then make a canonical URL and refer to itself. So if your view is placed on http://domain.com/page, and you have a version such as http://domain.com/page?ref=query, you should have a canonical URL that is http://domain.com/page.
In a lot of ASP.NET MVC projects, many pages end up having a /home/ url. An example could be /home/contact. The shorter and more clear URLs, the better. And this is just a quick small thing to update inside the route file.
When you have a paginated result, it’s worth implementing the “prev” and “next”. It’s a way of telling the search engines you are on a paginated result, and what the next and previous pages are.