SEO Turtorial : sitemap.xml, robots.txt, canonical link, 301 redirect and 404 page
sitemap.xml, robots.txt, canonical link, 301 redirect and 404 page
Search Engine Optimization (SEO):-
After talking about contents and keywords, URLs structure and navigation, Anchor text Links and nofollow links in the previous article,we will continue here with other SEO topics like sitemap.xml, robots.txt, 404 page, canonical link and 301 redirect:-
sitemap.xml:- is a page on your website that represents the structure of your website and pages of your website.
- Search engines will visit sitemap.xml to crawl your website pages to be index.
- You can generate your sitemap.xml file throw Generate sitemap, or the best way is that your website generates automatic sitemap.xml when adding any new page inside your website.
- sitemape.xml file location is under www.example.com/sitemap.xml
Here is an example of sitemap.xml:-
robots.txt:- is a plain text that allows search engines to crawls, index and what is restricted to be crawled on your website.
robots.txt file content is :-
- user-agent :- means search engines.
- Disallow: - restrict search engine any directory inside this.
robots.txt location is www.example.com/robots.txt
Here is an example of robots.txt:-
# robots.txt User-agent: * Disallow: /invoices/
404 page: - when users enter a page that doesn’t exist on your website, it will appear a 404 page.
404 page must be useful to guide users back to a working page, content on your website and friendly.
rel =”nofollow” for links :-
- The use of rel = “nofollow ” tells the search engines that this link on your site shouldn’t be followed or pass your page reputation, maybe its not trusted website.
- <a href=http://www.example.com rel=”nofollow”> Website </a>
Canonical link: - is an html element used to prevent duplicate in your content, tell search engine that this is my primary address (domain).
It’s used in side your <head> tag. here an example :-
<link rel="canonical" href="https://pyodoo.com"/>
301 redirect: - is a permanent redirect from a URL to another.
- Stop duplicate content and waste time in redirecting to your website.
- Example :- www.example.com is different from example.com, so redirect your website to one with www. or with out.
Kindly check this image:-
You can check your site SEO and imporve it throw SEO Websites like site analyzer and you can check your redirection also.
© 2020 PyOdoo.