When the same content has multiple accessible addresses, where should the standard address be marked?
When the same content has multiple accessible addresses, should the standard address be marked in the page or the response header? Both are permissible and have the same effect. The protocol layer has clearly specified this matter: the normative relation value is used to identify the normative version of the resource (i.e., this address string and its content), which can be expressed through the link relationship in the response header or written in the embedded link elements in the document. Even the relative form abbreviations are given in the examples. That is to say, the location is not the issue, the problem is which address to choose and when to use the redirection.
Where do the multiple addresses coexist come from?
An address accessible within the site, usually coming from four sources: list derivative addresses with filtering or pagination parameters, two forms of pseudo-static rewriting, trailing slashes and case differences, and the original address retained when jumping from short links or activity pages.
Most of these sources are not intentionally made, but the result of configuration stacking. With pseudo-static rules enabled, the old form with parameters can still be opened; with column renaming, the old address is not configured for redirection, and content can still be returned; the same content is placed in two columns, resulting in two paths.
The coexistence itself is not wrong, the problem is that the same content can be accessed with multiple addresses, and external references and statistics will be split. The declaration of a standard address is to solve this problem.
The definition of this link relationship in the protocol
The definition of this relationship value is on two sentences: one is 'the standard version of the identified resource', and the other is 'the address string and its content together constitute the object identified.'
From this, three actual boundaries can be read.
The first one, it is a declaration rather than an order. The protocol specifies how to express intentions, whether the reading party merges according to this is another matter, so it cannot be used as a substitute for handling duplicate content.
The second one, it can appear in two places. The response header and the built-in tag in the document are both legal, the choice depends on the cost of the transformation: use the tag if the template can be changed, use the response header if the template cannot be changed and needs to be processed uniformly at the gateway or application. The address of static resources usually only has this response header route.
The third one, the declared target should point to consistent content. When the content pointed to by the specification address is inconsistent with the source content, this declaration does not solve the repetition at all, but will introduce new ambiguity.
When writing within a site, it is also important to note that both absolute and relative forms are available, but in a multi-site scenario, using the absolute form is more stable, as it can avoid the situation where the cross-site relative resolution does not target the expected site.
Two cases: one that can be redirected and one that can only be marked.
The division line is here: if an address can be determined not to be used independently, it should be merged using redirection; if both addresses need to be retained for use, the relationship should be written out using standard declarations.
AnQiCMS supports 301 redirect management and redirection settings, version updates, column name changes, and retention of old links all belong to the former category - old addresses should no longer have independent value, directly set redirection to let access and references converge to the new address.
This kind of situation is more common in parameter form: the same content with parameter addresses, pagination end segments, and tracking parameters are intentionally retained. The user clicks in to view the same content. At this time, use AnQiCMS's pseudo-static rule management to define a set of external forms, and the specification declaration points to the recognized form in that set, avoiding the inconsistency between declaration target and actual entry.
Do not use the two methods together. It is meaningless to write a specification declaration on the old content page after the jump address is configured; conversely, if multiple entry addresses need to be configured for jump, it will directly change the function.
On-site configuration order and self-inspection
Do it in this order, less rework:
First, make a list. List out the address forms that can be obtained from the same content - with parameters, pseudo-static, slash differences, cross-column repetition, and write one example address for each. The list is not listed, and the next step is to guess.
Then, categorize. Merge what can be merged and declare what needs to be retained. This step only makes one judgment: does this address have independent value?
Then define the declaration. The static rules determine the external form, point the declaration to it; the declaration position should be consistent throughout the site, do not write some pages in the tag and some in the response header - both are legal, but mixed use will make it difficult to find a unified entry for subsequent verification.
Finally, check. Take all the addresses of an article, visit them one by one, and see if the returned status code, the final address, and the target pointed to by the declaration are consistent with each other; then check whether the addresses listed in the site map are the recognized form.
Common questions
Do you need to redirect after writing the declaration on the page?Use for purpose. The declaration handles who represents the same content among multiple entries, while redirection handles the 'old address no longer providing services to the outside'. Versioning and path changes belong to the latter, and merely writing a declaration is not enough.
Will there be a conflict if both the response header and page tags are written at the same time?Both are usable in terms of definition, but the content must be consistent. When both point to different targets, the conflicting declarations received by the reader are even harder to explain.
To which page should the pagination list be declared?Pages have different content and do not belong to the same set of content. The declaration should point to itself rather than the first page. Only when a page is just another presentation of the same content, should the declaration point to the normative form of that set of addresses.
Should multilingual sites make mutual declarations?No. The main text content of different languages is different and does not constitute repetition; cross-language referencing would instead treat both language contents as one, which is more reasonable to maintain consistency within each language.