As content operators, we fully understand the importance of making search engines clearly understand the structure of our website.幸运的是,规范链接(Canonical URL)正是解决这一问题的英语翻译。It clearly tells the search engine through a simple tag: 'Hey, these pages that look similar are actually based on this URL, please concentrate all the weight on it!'}]
Common scenarios of content repetition and SEO challenges
In daily website operations, content repetition may occur in various situations. For example, a product may be displayed on multiple category pages at the same time; article content may vary due to pagination, print versions, or user-defined parameters (such as?utm_source=...而产生带有不同URL的相似页面;或者网站在HTTP和HTTPS版本、带wwwand withoutwww之间没有做好统一跳转,也会形成重复内容。
How to set up a standard link in AnQiCMS to solve the problem
AnQiCMS knows the importance of SEO for websites, so it provides a clear way to set and manage standard links.This process is mainly divided into two parts: background configuration and front-end template invocation.
1. Backend configuration of standard links
In AnQiCMS backend management interface, we can specify the standard link for each document (whether it is an article, product, or other custom content model).When you edit a document, just focus on the "Content Management" module under the "Add Document" or "Edit Document" page.
Scroll down the page and you will find a collapsible area named "Other Parameters".After expanding this area, you will see an input box named "Standard Link".Here, you need to enter the authoritative or preferred URL for this content.
Examples to illustrate:Assuming your website has an article about "AnQiCMS feature introduction", its standard URL ishttps://www.yourdomain.com/articles/anqicms-features. But for some reason, it may also be accessible throughhttps://www.yourdomain.com/article?id=123orhttps://www.yourdomain.com/blog/anqicms-features-print-versionThis URL can be accessed. In this case, when you are editing the article in the background, you should fill in the "standard link" fieldhttps://www.yourdomain.com/articles/anqicms-features.
Key points:
- Complete URL:Be sure to fill in the one that includes
http://orhttps://The complete link, for examplehttps://www.kandaoni.com/article/98. - Manually specify:AnQiCMS allows you to manually specify, which means you need to judge and set for each possible page with duplicate content.This manual control gives the operator great flexibility and precision.
- Applicable scenarios:When you specifically want to direct the SEO weight of the current page (or its variants) to another specific URL, this setting is particularly important.This is often used on foreign trade websites, where the same product may exist in different categories or language pages, but a main page needs to be specified.
2. Front-end template call specification link
Just setting the specification link in the background does not mean that search engines can find it. We still need to output this tag correctly on the front-end page of the website. Specification links are usually in<link rel="canonical" href="[您的规范URL]" />Placed in the form of in HTML pages<head>areas.
In AnQiCMS, you can easily achieve this through template tags. Usually, this tag is placed in the public header template file of the website (such asbase.htmlIn English, ensure it applies to all relevant pages.
You can use{% tdk with name="CanonicalUrl" %}This tag is used to obtain the specification link set in the background. To avoid outputting an empty tag on a page without a specification link, we usually combineifa statement for judgment:
{%- tdk canonical with name="CanonicalUrl" %}
{%- if canonical %}
<link rel="canonical" href="{{canonical}}" />
{%- endif %}
The meaning of this code is:
- Firstly, try to get the current page's standard link value and store it.
canonicalthe variable. - Then, judge.
canonicalWhether the variable is empty. - If
canonicalNot empty (i.e., the standard link is set on the back-end), then on the page's<head>Partial output<link rel="canonical" href="{{canonical}}" />Label.
Thus, when the search engine crawls the page, it can accurately read the specification link you specified, thereby avoiding SEO problems caused by content duplication.
The actual operation scenario and precautions
The difference between 301 redirection and standard links:
- 301 redirection (AnQiCMS supports):Used when a page is permanently moved from one URL to another.The access requests to the old URL will be automatically redirected by the server to the new URL, and 90-99% of the weight will be passed on.
- Standard links:Used when multiple URLs point to the same or similar content, but you want all of them to exist, just to inform search engines which is the 'preferred' version. The page itself will not perform a redirect.
- 选择依据:If the content of the old page is no longer needed, and the user should be redirected directly to the new URL when accessing the old URL, use 301.If multiple page contents need to be retained but only want to concentrate the SEO weight on one of them, use the canonical link.
AnQiCMS的伪静态功能:AnQiCMS powerful pseudo-static function (mentioned in "Advanced SEO Tools") itself can greatly reduce duplicate content problems caused by URL parameters.In most cases, if your website URL structure is already very friendly through pseudo-static configuration and there are no other mechanisms generating duplicate content, it may not be necessary to manually set the standard link for each page.But for pagination, search result pages, or other special customized URL variants, standard links are still necessary safeguards.
全站一致性:Set the link specification to ensure it is consistent with the overall URL strategy of the website. For example, if your website uniformly uses HTTPS and includes
wwwThe domain name, so your standard link should also behttps://www.yourdomain.com/....Regular Inspection:Use Google Search Console (or other search engine webmaster tools) to regularly check the indexing status and normalization error reports of the website.This helps to identify potential duplicate content issues and to verify that the standard links you have set are correctly identified and processed by search engines.
By accurately setting up standard links in AnQiCMS, we can not only avoid the dilution of SEO weight caused by content repetition, but also ensure that search engines efficiently understand and index every piece of valuable content on our website.This not only improves the visibility of the website in search results, but also provides users with a clearer and more authoritative browsing experience.
Common Questions (FAQ)
Q1: Should I set a standard link for each page of the AnQiCMS website?
Q2: If I set the specification link in the AnQiCMS background but forget to add it in the front-end template, what will happen?<link rel="canonical">What if I forget to add the tag?A2: If you only set the specification link in the AnQiCMS background without setting it through the front-end template<link rel="canonical">If the tag is output, then the search engine will not be able to recognize the setting of this standard link.In this case, your settings will not take effect, and the search engine may still treat multiple URLs with duplicate content as independent pages, which could lead to weight dispersion and SEO issues.Therefore, backend settings and frontend template calls are two indispensable steps.
Q3: What risks are there in setting an incorrect specification link?A3: Setting incorrect specification links may have serious negative SEO impacts.For example, if you accidentally point a specification link to an irrelevant, non-existent, or low-quality page, the search engine may transfer all the weight to that incorrect page, even causing your important page to disappear from the search results.In the worst case, this may be regarded by search engines as a manipulative behavior.