The first article in my blog: personal blog SEO optimization (2) : station optimization

Hexo’s personal blog SEO Optimization (1) : Introduction to search Engine principles

Hexo personal blog SEO Optimization (2) : Site optimization

Hexo Personal Blog SEO Optimization (3) : Transform your blog to improve search engine rankings

SEO optimization can be divided into intra-site optimization and off-site optimization, and intra-site optimization is divided into: website structure optimization and website page optimization. From the perspective of SEO, the purpose of website structure optimization is:

  • Improve user experience
  • To improve collection
  • Better weight distribution
  • Optimize anchor text distribution

Site structure optimization has the following elements:

  • Physical and link structures
  • Clear navigation
  • Assign subdomain names and directories
  • Prohibition mechanism
  • Nofollow use
  • URL static
  • URL design
  • Url normalization
  • Duplicate content
  • Sitemap sitemap
  • Internal links and weight allocation
  • 404 pages

Website structure optimization

Physical and link structures

Physical structure refers to the structure of the site as determined by the location of the actual directory and files. In general, the two physical structures that make sense are flat and tree. Flat is where all the pages are placed at one level, which is generally only suitable for sites with a small number of pages. It’s more of a tree structure. For example, a blog built with Hexo uses a tree structure:

Link structure refers to the structure formed by links to pages within a site. Link structures are usually also tree structures:

For search engines, link structures make more sense than physical structures. In the last personal blog SEO optimization (1) : the principle of the search engine has been introduced, and the closer the distance from the home page click is the probability of spider crawling, that is, the higher the weight. Click distance refers to the distance of the link structure. For example, P3 page also belongs to the third level, because it is directly linked to the home page, its home page click distance is shorter than other pages, so it will have higher weight.

Setting a reasonable website link structure is conducive to the allocation of page weight.

Clear navigation

A clear navigation system is an important goal in website design. After all, you don’t want your users to go to your front page and have a confusing navigation that makes it hard to find the page they wanted. The same is true for search engine spiders, where cluttered navigation reduces spider crawl probability.

Note the following points when setting up your site navigation:

  • Text navigation. Try to use HTML static text for navigation rather than dynamic navigation generated by JavaScript. This minimizes drag for a spider. Navigation system links are the most important internal links included in the whole site
  • Click distance and flatten. One of the goals of navigation is to make all pages as close to the home page as possible. Like weight ordinary website, the inside page generally do not exceed the home page 4, 5 clicks. So try to be as flat as possible in the link structure.
  • Anchor text contains keywords. Navigation keywords try to use target keywords.
  • Breadcrumb navigation. For medium and large sites, bread crumbs are essential. It is the best way to help users and search engines establish the position of a page within the overall structure of a site.
  • Avoid footer stacking. In recent years, the practice of footer stacking keywords seems to be unpopular with search engines. Try to avoid this practice.

Subdomains and directories

Search engines often treat subdomains as separate sites. The directory is part of the domain name. A child domain such as http://api.chenhuichao.com is http://www.chenhuichao.com. http://www.chenhuichao.com/tags is a directory.

Therefore, the optimization of the main domain name, for the sub-domain site, also need to do again. Common websites and blogs do not require subdomains. Only large sites will need it.

Prohibition mechanism

If you do not want specific pages to be excluded, you can specify them by robots files or Meta Robots tags to ensure that pages will not be included by search engines.

Robots file

This file is the first to be accessed by a search engine’s crawling site and is used to tell the search engine what content can and cannot be crawled. If there are no writing rules or robots files, it is the default that all can be climbed.

However, due to some web server Settings, if there is no robots.txt file, it will return 200 status code and some error messages. This may cause the spider to misinterpret the information. Therefore, it is recommended to at least put an empty robots.txt file in the root directory of the site. The format of robots is as follows:

User-agent: *
Disallow: /
Copy the code

The file above means that all search engines are not allowed to crawl all content. User-agent: * Runs all search engines. As we know, different search engines have different spider names. On user-Agent you can also set the name to allow only specific search engines to crawl. For example, if user-agent: Googlebot Disallow does not add any path, it will run to crawl any content. Note that if you Disallow multiple folders or files, write multiple lines. You can only write one line per Disallow.

The meta robots tag

Use
to prohibit search engines from indexing the content of this page or tracking links on this page. The parameters of content are:

  • Noindex: does not index the contents of this page
  • Nofollow: Do not track links on this page
  • Nosnippet: Do not display captions in search results
  • Noarchive: Do not display snapshots
  • Noodp: Don’t use titles and instructions in open directories

Each parameter must be separated by a comma.

nofollow

The format is as follows:

<a href="" rel="nofollow">nofollow</follow>
Copy the code

The Nofollow TAB is an “anti-spam” TAB pioneered by Google and widely supported by other major search engines on the market. Nofollow is an attribute value of the A tag. Used to tell search engines not to track the link because it is not trusted by the author. Nofollow on meta tag refers to a single link, while nofollow on meta tag refers to all the links on the entire page.

Nofollow is commonly used in blog comments, forum posts, social networking sites, message boards, and more. Because the content in these places is free to leave links, the webmaster does not know whether these links are credible. It turns out that when you post on a SegmentFault or nuggets post, your external links will always have rel=”nofollow”.

At the same time for some of the site internal pages of repeated content or some do not need to be included in the link can be added to the label, can prevent site weight waste. For example, pages like Contact us and privacy policy can use the Nofollow tag.

URL static

We all know that corresponding spider crawls are unfriendly for dynamic pages. Therefore, we need to make the URL static to better allow spiders to crawl.

This is not a problem for Hexo blogs. After all, the blog itself is static, and all the pages are HTML pages.

Standardization of Web address

Address specification refers to the use of unique urls rather than multiple urls. For example, the following urls visit the same content, but the search engine will treat them as different pages

  • http://www.chenhuichao.com
  • http://www.chenhuichao.com/index.html
  • http://chenhuichao.com/index.html

Duplicate content

Duplicated content, also known as duplicated content, is when multiple urls have the same or very similar content. Copying content can occur within the same site or on different sites.

If there is too much copying on a site, it can be harmful. One is the possibility of making search engines suspicious of the quality of the site, leading to penalties. On the other hand, too many copies within the same site will spread the weight.

So how do you eliminate duplicates?

  • Make sure urls are unique. There is only one URL per page.
  • For some pages that really need more than one URL, use a 301 redirect
  • Use the cannoical tag

Site map

No matter the size of the site, a sitemap is needed. Sitemaps are available in HTML and XML versions. The HTML version of a sitemap is simply a page listing the structure of the site. The XML version is done by adding the sitemap.xml file to the root directory.

<? xml version="1.0" encoding="UTF-8"? > <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>http://chenhuichao.com/2018/04/13/seo/seo-search-engine-principle/</loc> </lastmod> 2018-04-13T13:49:50.000z </lastmod> <changefreg> Monthly </ Changefreg > <priority>1</priority> </url> </urlset>Copy the code

An XML version of the sitemap looks like this. The meanings of the labels are as follows:

  • Url, of course, is the parent tag of the web address
  • Loc, mandatory, full URL of the page
  • Lastmod, optional, when the page was last updated
  • Changefreg, optional, frequency of page updates
    • always
    • hourly
    • daily
    • weekly
    • monthly
    • yearly
    • never
  • Priority Optional page weight

With the exception of the URL and LOC, which are mandatory, the other tags are optional and actively tell the search engine some information about the page, again at the discretion of the search engine.

After making a good site map, the need to take the initiative to tell the search engine. There are two ways: take the initiative to submit sitemap in webmaster tools, robots.txt file to specify the location

For example, the Google search engine can be submitted on the Google webmaster.

Another way is to indicate the location of sitemap.xml in a robots.txt file that also lets search engines know where the sitemap is.

Sitemap: http://www.chenhuichao.com/sitemap.xml
Copy the code

Internal links and permission assignment

The home page weight of a website is the highest, followed by secondary classified pages, and the link structure we mentioned earlier, is also a tree structure. There are several principles for assigning internal rights:

  • Key inside pages can be weighted by linking directly to the home page
  • Set nofollow for non-essential pages without dispersing weights

Anchor text is also a very important means of internal permission allocation. Wikipedia is absolutely the best at this.

404 pages

A dedicated 404 page is required when the page being visited does not exist. 404 page design needs to pay attention to a few points:

  • Keep your style consistent with the site
  • An error message should be prominently displayed to clearly inform the user that the page being visited does not exist.
  • Error pages can also provide several kinds of jumps: back to the home page and other links that you direct the user to

A tip about 404 pages and links because search engines don’t crawl for reasons that don’t exist. There must be an external link to the address, such as a reference to someone else’s blog page, which you may have deleted or changed. Therefore, we can find the wrong links on our website through Google webmaster tools, and redirect to the right page with the wrong address as 301 or directly create a new page on the original NON-existent URL to receive the weight of these external links.

Page optimization

Url page optimization can be carried out from the following angles:

  • The page title
  • The description meta tag
  • Keyword meta tags
  • Key words in the text
  • H tag
  • Image ALT text
  • Internal links and anchor text
  • External links and anchor text
  • Page updates

The page title

Page titles are the most important factor in page optimization. The format is as follows:

<title> Personal blog SEO</title>Copy the code

When optimizing the title, note:

  • Each heading should be unique and unique based on the current content.
  • Word limit. Do not make it too long, or the list of search engine results will be incomplete. Preferably no more than 25 Chinese characters. The best is between 10 and 20.
  • Do not stack keywords. This is a common mistake many people make
  • The key words should come first
  • The title is attractive. After all, it’s the headline that makes people click
  • The use of conjunctions. You can use|->
  • Don’t use meaningless sentences

The description tag

The Description tag is used to describe the body of the page. The format is as follows:

<meta name="description" conent="Seo learning Notes, seo optimization of personal blogs by learning SEO to improve search engine rankings"
Copy the code

The Description tag is much less important than the title. The user will not see the description text on the page, only in the source file and search structure list. But search engines don’t just submit description tags for display in search results. Sometimes search engines will dynamically extract captions based on the content of the article.

For individual sites, the description tag should be a coherent sentence, or if not, avoid it.

Keyword tags

The keyword tag no longer has any impact on SEO.

Key words in the text

Keywords in the text involve two concepts:

  • Word frequency: the number of occurrences of a keyword
  • Density: The number of occurrences of keywords divided by the total number of words visible on the page

Since word frequency and density have little impact on SEO these days, just keep your keywords in your text 4-6 times. Never pile up keywords.

H tag

The importance of H tags is probably secondary to page tags. H1->H6 in descending order of importance.

Therefore, it is recommended to mix keywords in the H1 and H2 tags of the page

Image ALT text

This is a routine operation for the front end siege lion. After all, images require ALT text, which is used to display ALT text when the image is not displayed. Image ALT text keywords appear on the page relevance also has a certain impact. Also, don’t pile keywords on ALT.

Internal links and anchor text

Internal links are very important for crawling and collecting. Internal links also have an impact on page keyword relevance, the most important is the use of anchor text in internal links.

Anchor text is one of the most important basis for telling search engines the subject content of linked pages. We may sometimes not be able to control the anchor text of external links, but we can control the anchor text of internal links within the site. But there are a few caveats:

  • Anchor text matching keyword appears appropriately
  • Anchor text should not be centralized in navigation or at the bottom of the page, but should be scattered throughout the body of the text
  • Don’t over-optimize anchor text, or you may be punished by search engines

Export links and anchor text

There are two possible scenarios for exporting links:

  • The content of the exported link page is not consistent with the anchor text, which will have a certain impact on the relevance of the website page
  • If you lead to an authoritative site, the page itself will become more relevant

Page updates

There is no doubt that keeping up with updates improves rankings. After all, page update rate is also one of the factors that attracts spiders back to crawl.

Through some of the above introduction, basically the station optimization of the basic elements covered. Although for website SEO, the optimization significance of off-site links is far more important than in-site optimization, but that doesn’t mean you don’t need in-site optimization. Only by doing some basic in-site optimization details well and keeping high-quality content updated can we attract more users.

So the next article will cover how to tailor SEO to the Hexo theme.