As a website operator who has been deeply engaged in AnQiCMS for many years, I fully understand the profound impact of every detail on SEO optimization in content creation and publishing.The canonical URL is one of the often overlooked elements that are crucial for search engine rankings and website health.It can effectively solve the problem of duplicate content, concentrate page weight, and is an effective tool for improving SEO performance.I will elaborate in detail on how to configure standard links for single pages in AnQiCMS, and provide you with a comprehensive guide through actual operations.

Understanding the role of specification links in SEO

A standard link, simply put, is to inform the search engine of the "preferred" URL address of a content page. In website operations, a page may have multiple URLs due to various reasons, such as:

  • URL parameters:example.com/product?color=redandexample.com/product?color=blueMay point to the same product page, just with different colors displayed.
  • Session ID: Some CMS systems may add session IDs to the URL, such asexample.com/page?sessionid=xyz.
  • Protocol or domain name changes:http://www.example.com/page/https://www.example.com/page/http://example.com/pageetc.
  • Print version or archive: There may be a simplified or older version of the content.
  • Content aggregation or转载: When your content is referenced by other websites or you actively publish it to multiple platforms.

For search engines, these different URLs may be considered as independent pages, thus leading to the problem of duplicate content.This may scatter the search engine weight of the page, and may also make it difficult for search engines to determine which is the true original or preferred version, thereby affecting the ranking of the page.The role of standard links is to clearly indicate which URL is the main version, allowing search engines to concentrate the weight of all variant pages to this preferred URL, avoid duplicate content penalties, and ensure that the correct page is indexed and ranked.

Configure the specification link in AnQiCMS

AnQiCMS provides a straightforward way to manage page specifications (especially document type pages) to meet SEO optimization needs.

When you are editing a 'document' (such as an article, product details, etc.) in the AnQiCMS backend, you can find an input box named 'normative link' in the 'other parameters' section.The establishment of this field is to solve the repetition problem mentioned above.If you want the current document page to direct its SEO signals to another URL, you can enter the target URL here.This is very useful when content is aggregated, or when you specifically want to promote a version of a page as the main version.Make sure to usehttp://orhttps://The complete absolute path link at the beginning.

For the "Page Management" module under AnQiCMS, such as "About Us", "Contact Us", etc., although there is no explicit input box named "Standard Link" listed in the provided documentation, but AnQiCMS, as a SEO-friendly system, usually adopts the following strategies:

  1. Link to automatically generated self-referencing specificationBy default, the system generates a canonical link pointing to the URL of each page, which is a good SEO practice to ensure that the page itself is the preferred version.
  2. Implement through a "custom URL" or similar fieldIn some cases, the 'Custom URL' field may indirectly assume the role of a standard link, or the system may generate a standard link based on this field.
  3. Processing at the template level: At the template level, we can dynamically call system variables to ensure the correct output of the standard link.

Therefore, whether it is editing documents or managing single-page pages, even if the 'standard link' field is not explicitly seen, we should understand the SEO logic and implementation mechanism of AnQiCMS behind it.

Implement standard link output in AnQiCMS template

After configuring the standard link, the most critical step is to output it correctly in the website's front-end template so that search engines can read it. In AnQiCMS, this is mainly achieved bytdkthe tag.

You need to add in the website template's<head>region the following code segment:

{%- tdk canonical with name="CanonicalUrl" %}
{%- if canonical %}
<link rel="canonical" href="{{canonical}}" />
{%- endif %}

The purpose of this code is:

  1. {%- tdk canonical with name="CanonicalUrl" %}This line of code will attempt to retrieve the 'CanonicalUrl' standard link value from the TDK (Title, Description, Keywords) settings on the current page and assign it to the variable namedcanonical.
  2. {%- if canonical %}This is a conditional judgment. It checkscanonicalif the variable has a value. Only when the specification link indeed exists, will the subsequent code be executed, to avoid outputting empty.link.
  3. <link rel="canonical" href="{{canonical}}" />If:canonicalThe variable has a value, this line of code will be displayed on the page.<head>Partially insert a standardlinkwhererel="canonical"Property explicitly tells the search engine,hrefThe specified URL in it is the preferred version of this page.

By placing this code inside a tag,you can ensure that search engines can quickly identify and follow the specified link specification instructions when crawling the page.<head>标签内,您可以确保搜索引擎在抓取页面时,能够迅速识别并遵循您设定的规范链接指令。

Best Practices for Standard Link Usage

To maximize the SEO benefits of standard links, as a website operator, we need to follow some best practices:

  • Use Absolute Paths: Specifying a linkhrefThe attribute value must be a complete absolute URL (for example:https://www.example.com/page), not a relative path (for example:/page)
  • Ensure accessibilityThe specified URL must be a valid page that can be crawled and indexed by search engines. Do not point to pages that are protected by passwords orrobots.txtblocked or return a 404 error status code.
  • self-referencing specification linkFor pages with no duplicate content, the practice is to add a