As a website operator who has been working on AnQiCMS for many years, I am well aware of the profound impact of every detail on SEO optimization in content creation and publication.The specification link (Canonical URL) is one of the often overlooked aspects 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 to improve SEO performance.Next, I will elaborate on how to configure standard links for single pages in AnQiCMS, and provide you with a comprehensive guide through actual operations.
Understand the link specification and its role in SEO
The standard link, in simple terms, is to tell the search engine the "preferred" URL address of a content page. In the operation of a website, a page may have multiple URLs for 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 as
example.com/page?sessionid=xyz. - Changes in protocol or domain:
http://www.example.com/page/https://www.example.com/page/http://example.com/pageetc. - Print version or archive:There may be a simplified or old version of the content.
- Content aggregation or reproduction:When your content is cited by other websites or you actively publish it on multiple platforms.
For search engines, these different URLs may be considered as separate pages, which may lead to the problem of 'duplicate content'.This may not only distribute the page's search engine weight, but may also make it difficult for search engines to determine which is the true original or preferred version, thereby affecting the page's ranking.The purpose of the specification link is to clearly indicate which URL is the main version, so that search engines can 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 specification link in AnQiCMS
AnQiCMS provides a straightforward way to manage the standard links of page (especially document type pages) to meet the needs of SEO optimization.
When you are editing a "document" (such as articles, product details, etc.) in the AnQiCMS backend, you can find an input box named "Standard Link" in the "Other Parameters" section.This field is set up 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.http://orhttps://A complete absolute path link at the beginning.
For the single pages (such as “About Us”, “Contact Us” etc.) under the “Page Management” module in AnQiCMS, although there is no specific input box named “Standard Link” listed in the provided documents, AnQiCMS, as a SEO-friendly system, usually adopts the following strategies:
- English generated by self-reference specification link:By 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 is its preferred version.
- Through the 'Custom URL' or similar fieldIn some cases, the 'Custom URL' field may indirectly take on the role of a standard link, or the system may generate a standard link based on this field.
- Template level processingIn the template level, we can dynamically call system variables to ensure the correct output of the specification link.
Therefore, whether editing documents or managing single-page applications, even if the "standard link" field is not explicitly seen, we should understand the SEO logic and the implementation mechanism of AnQiCMS.
In AnQiCMS template to implement standard link output
After configuring the standard link, the most critical step is to output it correctly in the website's frontend template so that search engines can read it. In AnQiCMS, this is mainly achieved throughtdktags to achieve this.
You need to add the following code in the<head>Add the following code segment to the area:
{%- tdk canonical with name="CanonicalUrl" %}
{%- if canonical %}
<link rel="canonical" href="{{canonical}}" />
{%- endif %}
The function of this code is:
{%- tdk canonical with name="CanonicalUrl" %}This line of code will attempt to retrieve the 'CanonicalUrl' value from the TDK (Title, Description, Keywords) settings of the current page and assign it to the variable namedcanonical.{%- if canonical %}: This is a conditional judgment. It checkscanonicalThe variable has a value. The subsequent code will only be executed if the standard link indeed exists, to avoid outputting an empty one.linkLabel.<link rel="canonical" href="{{canonical}}" />IfcanonicalThe variable has a value, and this line of code will be executed on the page.<head>Partially insert a standard one.linktag for each language site,rel="canonical"属性明确告诉搜索引擎,href中指定的URL是此页面的首选版本。
通过将这段代码放置在<head>Tags within can ensure that search engines can quickly identify and follow the specification link instructions set by you when crawling pages.
Practical use of specification links
To maximize the SEO benefits of standard links, as a website operator, we need to follow some **practices:**
- Use absolute pathStandard links:
hrefThe property 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 password-protected or
robots.txtblocked or return a 404 error status code. - autoauto