Newbie do SEO How to do it?
I have been in contact with a lot of people during this time seoer, Everyone wants to seo It's done well, but apart from some of them that have been done for many years seoer right seo Have a correct attitude and know how to do it well seo There are a lot of things to need, a lot of new seoer All right seo There is no complete understanding, especially when talking about code, many people just don’t know anything.
In fact, code optimization is seo An important part, otherwise posting an external link or writing an article will basically be done by individuals, in order to keep up SEO The pace of learning code is SEOER A necessary journey!
This is why I seoer I have always believed that seoer There are three stages to briefly talk about:
The first phase is the present seo The most people in the industry, they only have some seo The basics, even professional knowledge is not very good, and seo I learned enough professional knowledge but failed to break through the first stage.They only have seo Related knowledge.
The second stage is that there are currently a few people in the industry, and these people will seo Knowledge also has certain code knowledge, that is html or python technology.
The third stage can be said that there are even fewer people in the industry, and these people have more than seo, They also need to know programming for code knowledge.Only this group of people can truly seo Do it well.
Let’s not say much nonsense, just start today’s main content: seo Code optimization
1、DIV+CSS:
DIV+CSS The website structure is SEO Optimization plays an increasingly obvious role.
The reasons are as follows:
(1)、After adopting this structure, html The page basically only has text or picture information, and the style is placed css In this way, the search engine spider won't care css, Collect only html The content in it can greatly improve the efficiency of search engine spiders.
(2)、Using this structure often has more concentrated keywords and higher density.
(3)、div+css OK For table It is relatively simple and there is basically no problem of table nesting.
(4)、conform to W3C Standard web pages in SEO Optimization itself is an advantage and is also loved by search engine spiders.
2、Meta Label:
Meta Tags: If it is very simple, meta The tag only needs to set a character encoding. The templates we purchase at any place will be written with character encoding. Title Title, keyword, Description Descriptions are also listed here meta To optimize the tags, these three places are generally called directly to the background in the template, and can be set directly in the background, so the code needs to be basically no operation.
3、css/js Quote:
Search engine spiders process text files, and cannot see content that does not appear in the page source code. User behavior or other events will only obtain and embed dynamic content and connections on the page. Search engines cannot see a large number of web pages. javascript It will affect the spider's crawling of the page and increase the size of the web page, which will delay the opening speed of the web page and directly affect the user experience.
Minimize as much as possible during the optimization process javascript The application of code, for the necessary javascript, Also try to put it at the bottom of the website and load the text first, or externally js Call (encapsulated).
Why put it at the bottom?
Maybe you don’t know if you don’t understand the code. Let’s explain it here, because when the browser renders the page (that is, the display page) it will render from top to bottom.
Our template, JS It is definitely placed at the head, but in the process of optimization, JS The file is usually an effect file. We can let the website load the theme content first and then the effect content, so it is necessary to JS The file moves from the head to the bottom so that the user looks like your website will be accessed faster, of course if CSS If necessary, you can do this, regular CSS It is not recommended to put it at the bottom, as it will affect the loading effect.in addition JS and CSS Not recommended in html Write to the template, it is best to create a new one JS or CSS File, then JS or CSS Put the content in, call this CSS or JS Just file.
4、Clean up redundant code:
Cleaning up junk code is one of the very important links in simplifying code.Garbage code is a non-essential code that will not affect the display of the page after deletion. After a page has cleaned up the junk code, nearly 80% of the redundant code can be deleted.This will achieve the purpose of reducing the page size, improving the user experience of the page and search engine friendliness.Common junk codes include space characters, default properties, comment statements, and empty statements.
(1)、Space characters:
Space characters are actually symbols generated by tapping the space bar on the keyboard when editing code. Each space in a web page is counted as a character, which usually appears at the beginning, end, and in blank lines of each line of code.
(2)、Default properties:
When we use web page production software, we will generate some codes with default attributes. For example, we do not add left-aligned attributes to the web page, but the content in the page is also left-aligned, so the left-aligned attribute code in the code can be deleted.
(3)、Comment statement:
When making a web page, we will add some comment statements to enhance the readability of the code, but too many comment statements will occupy a lot of web page space. Moreover, if there are a large number of keywords in the comment statement, it will be considered by search engines to pile up keywords, thus punishing the site.Therefore, when we add comment statements, we try to avoid adding comment statements that will not affect the readability of the web page source code even after deletion.
(4)、Empty statement:
An empty statement refers to an empty sentence that does not exist between the labels.
5、LOGO:
LOGO There are two main aspects that need to be optimized. The first aspect is LOGO Add H1 Tags, followed by LOGO of A Add one to the tag title property, title Write the main keyword you optimized in the attributes. There are two reasons why it is recommended to write the main keyword instead of the brand word. The first is to increase the density of the main keyword, and the second is title It is rare for users to see attributes.
6、navigation:
Optimization on navigation is usually A Tags, this A The tag does not recommend setting a new window to open, the other one is A In the tag title Attributes, if conditions permit, can be directly set to industry words, and A The text that can be displayed in the tag can be set as brand words, so that the effect of optimizing keywords is achieved without affecting the experience.
One thing to remind you here is that when two identical ones appear in an article A When the tag points, we need to use it nofollow The tag blocks one of the links, and the same link appears here as the description and title. It is recommended to use it here. nofollow The tag blocks the links on the description, and adds them to make it easier for users to click, and blocks are to prevent search engines from crawling repeatedly.
7、search:
Search pages on the site are not recommended seo, Because most website searches are dynamic pages, and these dynamic pages are directly used robots shieldBaidu Spider。
8、Image optimization:
(1)、name:
Since search engines cannot read image content, but can read text information about image names, we must ensure that the image file name or string contains the main keywords when saving image names.For example, a picture of a panda can be named as it should be, but we'd better name it xiongmao.jpg or panda.jpg so URL The string contains the key information of this image
(2)、ALT Label:
If the information in the picture is to better understand the search engine, it must be used. alt Attributes, pictures alt Attributes are a brief explanation of image information. alt Attributes are very important, they must be related to the picture and the content, and they need to avoid stacking for the sake of keywords. This attribute can not only allow search engines to understand better, but also allow users to understand the themes that the picture wants to display when there is an error in the picture.
Basically, website optimization is to better obtain information by users, rather than obtaining good rankings in search engines. Obtaining good search results rankings is just a natural reflection of normal website optimization results.So in the setting description alt When these attributes, the picture content should be described concisely in accordance with the principle of user orientation.
(3)、Image size:
If the website is not a professional image display, the website can only meet the ordinary visual effects, and the smaller the image, the faster it will load.
9、Copyright information:
Copyright can be left behind. Using other people's programs without leaving copyright is an immoral act, so it is necessary to leave copyright information at the bottom, but copyright, filing, and off-site links should be added. nofollow Tags, of course, this is a link outside the site, and some links need to be added on the site. nofollow Tags, such as advertising cooperation, contact information and other pages at the bottom of the website.
10、User experience:
In fact, there are many optimizations in this question about user experience, but the code can determine the user experience, such as adding the return to the top function of Baidu statistics, adding the quick comment function on the article page, a website can only display up to 3 screens, and can turn pages on the left and right. It seems that there are very few functions, but the comprehensive details determine the success or failure of a website!

The above is the "newbie doing" shared by Suyou.com with everyone SEO How to do it?", Thank you very much for your patience to finish this article. We will provide you with more information on reference, use or learning and communication.We can also provide you with:Enterprise website construction, website imitation, website copying, imitation site, foreign trade website construction, foreign trade website construction, company official website productionFor services, our company serves customers with the service concept of "integrity, professionalism, pragmatism and innovation".If you need cooperation, please scan the code to consult, and we will serve you sincerely.
TAG Label:SEO optimization