What is the preferred domain setting

When optimizing a website, there is a term called preferred domain. This term has been mentioned in many SEO training institutions or the experience sharing of seniors in the SEO industry. So what exactly is the role of the preferred domain, how to set the preferred domain on the website

  What is a preferred domain?

  A website's preferred domain is similar to a canonicalized URL and is the domain at which a web page is indexed by search engines. In search engine search results, links to websites have www and non-www URL formats. The so-called preferred domain is the format in which we want our website to appear in search results.

  In general, search engines think that domain names with and without www do not point to the same website. Therefore, both URLs will be included when the search engine includes the website.

  These two domain names point to the same website. After the search engine has stabilized its inclusion and display, it will choose one of the domain names to display to users, and this domain name is called the preferred domain.

  To put it bluntly, the so-called preferred domain refers to the domain that you want search engines to use to index your web pages, which is the preferred domain name of the website. Maybe the novice webmaster seems a bit convoluted, but in fact, when there are multiple domain names on your website, one domain name is preferred as your main domain name.

  How to set the preferred domain for the website?

  1. When domain name is bound and resolved, only one domain name is bound and resolved. (Not recommended for medium and large sites)

  2. 301 permanent redirection: 301 redirect your other domain names to your preferred domain, such as: mydomain.com 301 to www.mydomain.com

  The method of 301 redirection sets the weight of the preferred domain centralization.

  RewriteEngine is

  RewriteCond %{http_host} ^mydomain.com [NC]

  RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]

  When visiting SEOwhy.com/, it will automatically go to www.SEOwhy.com. Write the following code in the .htaccess file:

  This approach allows users and all search engines to adopt a preferred domain.

Guess you like

Origin blog.csdn.net/GNET0328/article/details/131440407