preface

This article explains how to optimize your urls for SEO, and how to optimize your urls for your WordPress blog Echeverra.

The cause of

I do not know much about SEO, only know that SEO does well, then the major search sites search your site related content, your site in the search results will be more advanced. SEO of his blog has not gone to study, after all, small blog just started, until today I received such a message.

Thanks for the comments and suggestions from the battery community webmaster. The battery community is a high-quality content sharing community in China’s battery industry. The website is rich in content, including all kinds of news, forum topics, live video and so on. I recommend it.

The general meaning of the comment is that the URL level of my blog post is too many, which is not conducive to the inclusion of major search engines, and thus affect the ranking of the site.

So the question is, is this really the case?

The URL to SEO

First of all, let’s learn about SEO, SEO full name Search Engine Optimization, translated as Search Engine Optimization, it is a kind of by analyzing the ranking rules of Search engines, to understand how various Search engines Search, how to crawl Internet pages, how to determine the Search results ranking of specific keywords. Use search engine rules to improve your site’s natural ranking in relevant search engines.

SEO is absolutely crucial to improve the site’s exposure and traffic, SEO optimization is now very commercial, Baidu SEO will find a lot of paid advertising.

Website SEO optimization is a university, today we only discuss URL optimization, I sorted out the following points:

1. Minimize the level of THE URL directory

Design URL directory level should not exceed three layers, this is because each major search engine spider crawl site page content is a priority, directory level less, the weight is higher, the probability of being captured is greater. Baidu especially likes pages with fewer levels of content.

Search engine spider knowledge extension:

Each major search engine has its own crawling and visiting page program called spider, spider program issued a page access request, the server returns THE HTML code, spider program will receive the code into the original page database.

Spider is through a web link address to find the web page, a page from a website (usually the home page) and read the content of the page, find other links in a web page, and then through these links for a web page, so the cycle continuously, until finish this website all web scraping.

However, considering the limitations of technology and performance factors, spiders will not crawl all the pages, it will only grab those more important pages, in the crawl evaluation of the importance of the main basis is the depth of the page link. In other words, the deeper the link, the more hierarchical the directory, the less important it is, and the less likely it is to be crawled by spiders.

So how should THE URL level design, a more reasonable directory level is: domain name/classification/content, so that each page can distinguish management, hierarchical, and SEO is also more friendly.

2. Keep the URL length short

For search engines, a URL of less than 1000 characters is fine, but for users, shorter urls have a better user experience and credibility, and are easier to click on. Long urls, on the other hand, can feel messy and cumbersome. And the shorter URL is also more conducive to dissemination and sharing, the avenue to simplicity, people increasingly prefer simple things.

3. The URL is (pseudo) static

The website had better open static mode, now the mainstream background has opened static URL function. Set up the site before it goes live, have pseudo static function, use pseudo static can also. Because static urls are easier to include.

Dynamic, static and pseudo static URL knowledge extension:

At present, the development of the website is in fact a real sense of the dynamic website, but some differences on the URL.

Dynamic URL such as https://host/news.php? Id =17 with “?” Is a dynamic URL, it is only a logical address, not a real physical server disk. It is a bit slow to open because of the computation, but this can be ignored. There are server caching technologies that can solve this speed problem. The biggest disadvantage is that the URL structure is slightly complex, which is not conducive to memory. Complex dynamic URL has a negative effect on SEO collection.

Static URL such as https://host/news/17.html, there is no “?” Is a static URL with a real physical path, that is, a real server. Because there is no need to calculate, so open fast, friendly structure, easy to remember, have a positive effect on SEO collection.

Pseudo static URL such as https://host/news/17.html and static URL, but in fact the pseudo static regulation dynamic urls disguised as a static URL. It is also a logical address. There is no physical address. Generally, you can configure the webServer and. Htacces files to achieve pseudo static state. Also has a positive effect on SEO collection.

4. Use lowercase letters in the URL

The URL is lowercase because Unix/Linux servers are case sensitive. For example, https://host/news/ can be accessed, but https://host/News/ will report an error. And the user search search input is generally lowercase letters, conducive to the search to find.

5. Include keywords in the URL

Keywords appear in THE URL, can improve a certain degree of relevance, and keywords appear in the URL location of the earlier the better, some studies pointed out that the number of keywords in the URL is useful for search engine algorithm. Keywords in the URL are also more readable and indicative to the user.

6. Use of connectives in URLS

It is recommended to use hyphens (-) when two or more words are needed in the directory or file name in the URL. Do not use underscores (_) or other symbols. Underscores (_) will be ignored in search engines, and hyphens (-) will be treated as Spaces. This is friendlier.

Blog URL SEO

Now that you know how to optimize urls, let’s start with blogs!

The background is set

The blog I use is WordPress and I found the fixed link Settings in background Settings.

Is currently the date and name type, that is, https://echeverra.cn/2021/09/04/blog-traffic/ this type, first of all, I want to custom set URL type structure, according to https://host/category/postname/ This satisfies all of the ABOVE URL optimizations.

But actual access URL is: https://echeverra.cn/archives/others/blog-traffic/, this is because of my articles classification level is more, to achieve four levels, settle for second best, I choose the article type.

Open the URL: https://echeverra.cn/blog-traffic/, is very relaxed, that’s Nice ~

Old link redirection

When I thought all was well, I suddenly realized before ruan God drainage article link is not invalid, a try 404.

This can not be done, and the original text of wechat official account is read, but it is the old link, can not change, so I want to write a page redirection script, just write it into my custom script using the theme.

Unfortunately, debugging found that this does not work, 404 page does not execute this script. Change WordPress source code? Does it get overwritten every time it’s updated? That’s not good either.

I found a redirection plugin for WordPress and, well, that’s easy. Background plug-in search 301.

I installed the first two plugins, probably related to the Settings, the number one Redirection did not take effect, to the second one is very easy to use, Settings are also very simple.

This realizes the page redirection, the old link directly jumps to the new link, does not affect the use. That’s Nice

You are advised to manually download the plugin from the plugin home page, decompress it, upload it to the WordPress server directory /wp-content/plugins/, and enable the plugin in the background menu.

Did you learn to “waste”?


The article first appeared in my blog echeverra.cn/seo-url/, original article, reproduced please indicate the source.

Welcome to follow my wechat official account Echeverra to learn and make progress together! Uncertain when there are resources and welfare oh!