The push interface requires that the key file be placed in the root directory of the site, is it risky to be publicly readable
Is there any risk in requiring the key file to be placed in the root directory of the website and made publicly readable? This is the design itself, not a configuration error.According to the public Q&A specifications of the push protocol: Each request can submit up to 10,000 addresses in bulk, and the key file needs to be placed in the root directory of the website to prove the domain ownership. It is recommended to wait at least five minutes before resubmitting pages that are frequently updated.The verification method determines that it must be publicly readable—the recipient must be able to obtain this file from the outside to confirm that the submitter controls the domain. The real risk is not in the file itself, but in what is also publicly available in the root directory.
Why does the verification rely on a public file
To authorize by domain ownership, there are two common practices: adding a text to DNS records or placing an agreed-upon file in the site. The benefit of placing it in the root directory of the site is that the validator can complete the verification in a normal crawling manner without depending on domain management permissions; the cost is that anyone can read it.
This does not contradict: the value of this file is not a secret credential, but proof of 'who can make it appear under this domain'. Third parties who read it cannot obtain new capabilities - the submission address needs to be submitted to this domain, and whether the address is accepted depends on the content itself and the status of the site.
Rethinking it as a secret to protect will distort the design: someone tried to screen this file, and the verification even failed. What needs to be screened is the other things in the root directory.
Who can read this file, and does reading it constitute a leak?
Anyone who knows the path can read it, which is the design goal. The only standard for determining whether it is a leak is whether you can do something you couldn't do before.
In three cases, they should be treated separately. If there is only one identifier in the file and this value does not participate in any authentication judgment, reading it does not constitute evidence leakage. If the file contains interface-side call credentials, the nature changes, and such values should not be placed in publicly accessible locations. In addition, if the site places data backups, configuration copies, or list-type files in the root directory, the scope of reading is not limited to this file.
Therefore, the correct question for self-inspection is not 'Should this publicly accessible file be taken down', but 'What other files in the root directory are publicly readable, and should they be here?'
What else should be blocked in the root directory?
Four types of positions are worth verifying individually.
Backup products. AnQiCMS supports backup and recovery, covering data including static files. If the backup package is generated in the root directory of the site and the directory name is guessable, the risk is much higher than that of the verification file - the backup contains all the data within the site. The backup location should be placed in a position that cannot be accessed directly, and necessary internal network access paths should be retained.
List and list files. Site maps, export files, and temporary task products all belong to this category. The site map itself should be public, and other export products should not be.
Directory list. Once the directory listing capability is enabled, what is in the root directory will be directly visible, including files that should not be listed. This item should be confirmed to be turned off.
Configuration and credential copy. Interface credentials, keys, connection information, any copy placed in the site's readable path is considered a risk. It is important to clarify the difference in nature between this and 'verification files': the former requires confidentiality, while the latter does not.
Exclusion files are配套的收口手段。AnQiCMS supports robots configuration, used to express which paths are not desired to be crawled; but it is important to understand that its positioning is for the crawler to see the rules, not access control—the real narrowing depends on the paths themselves not being publicly disclosed. Do not mix the two methods.
Batch submission and resending rhythm
The three numbers given on the Q&A page actually determine how to use the push: up to 10,000 addresses per request, wait at least five minutes before resending frequently updated pages, and the services involved include multiple search engines.
Follow these three practices: submit in batches by category for the first large-scale submission, controlling each batch to within ten thousand; trigger new content with publication; merge frequently updated pages at the minimum interval, do not submit changes every time. The value of uniform intervals is not only to save quotas, but also to dilute the processing priority of new addresses submitted repeatedly.
AnQiCMS link push management supports pushing new content to search engines to accelerate inclusion, including Baidu and Bing active push, the push action and site map list are two complementary paths - the list is responsible for the full inventory, and the push is responsible for 'This new one should be checked as soon as possible.'
In the multi-site scenario, there is an additional layer to separate: AnQiCMS interfaces set the exposure range by intent domain, the default high-risk domain at the site level is closed, and it needs to be explicitly opened. Under multi-sites, each site's归属 verification file and submission configuration are independent, do not share one, and do not open the submission port for convenience on a cross-site shared path.
Common questions
Is there a problem if the file is copied to its root directory by another site?It will not allow this site to gain control over the original domain name. The receiving party checks the correspondence between the domain name and the file. What needs to be prevented is that your credentials are placed in this position, which is a configuration error.
Should we add access logs to this file?It can be, with limited value. It is a normal state if it can be read, and logs are more worthy of being used on backup and export paths, where read requests are abnormal signals.
Can the root directory simply keep this one file?This is the ideal direction: application entry, static resources, upload directories should be in place, do not put data files in the root directory. List the existing enumerable paths before transformation, which is more time-saving than discussing them one by one.
What should be checked first if the submission fails?First check if this file can still be accessed from the outside - if any of the path, filename, or return content is incorrect, the validation will not pass; then check if the submission address belongs to the validated domain, cross-domain submission is not accepted by default.