As an experienced website operations expert, I fully understand the importance of Search Engine Optimization (SEO) for website traffic and exposure.Among the many powerful functions of AnQiCMS (AnQi Content Management System), the link push tool is undoubtedly a powerful tool to accelerate the indexing of website content and improve search engine friendliness.publicCreated in the directory{API Key}.txtWhere is the file hiding.

Revealing the correct ownership of Bing IndexNow API Key file

In the AnQiCMS documentationhelp-plugin-push.mdMentioned explicitly the Bing search engine主动pushedIndexNow APIIn the way, it requires us to be on the websitepublicCreate a file named{API Key}.txtThe file, and write the API Key itself into the file. This requirement seems simple, but for users unfamiliar with the AnQiCMS directory structure, finding the correctpublicThe catalog may be a bit confusing.

To accurately find the path where this file is placed, we first need to understand the architectural philosophy of AnQiCMS.AnQiCMS was designed with the safety and efficiency of the website in mind from the beginning.It separates the static resources of the website (such as CSS, JavaScript, images, etc.) from the core program code.publicThe directory, which is specifically designed by the AnQiCMS project to store these publicly accessible static resources that can be directly accessed through the web server. In other words, when your domain points to the AnQiCMS website, the "root directory" served by the web server (whether it is Nginx, Apache, or through an OpenResty container proxy) is usually thispublicDirectory.

Therefore, this{API Key}.txtThe specific file path is:

[你的AnQiCMS安装目录]/public/{API Key}.txt

Let's break down this path in detail:

  1. [你的AnQiCMS安装目录]This refers to the top-level path of the AnQiCMS project folder on your server. For example, if you installed it through Baota panel, it may be/www/wwwroot/你的域名/If you are manually deploying through the command line, it may be/data/wwwroot/anqicms/Or you can customize any path. This is the foundation of AnQiCMS program files (including executable files, templates, configurations, etc.).

  2. /public/This is a subfolder under the AnQiCMS installation directory, which carries all the static resources directly facing users and search engines. According to AnQiCMS'sinstall.mdanddesign-convention.mdDocument description, whether it is to configure the Nginx running directory of the Baota panel or to configure Nginx through the command line,rootthe root directory of the website's external access will point to this command.publicFolder. This means that any item placed in thispublicdirectory can be accessed directly via your website domain. For example, if you have an imagelogo.pngInpublic/images/below, it can be accessed through你的域名/images/logo.pngAccessed. Similarly,{API Key}.txtThe file must also be placed here, so that Bing's verification robot can pass through你的域名/{API Key}.txtAccess and read its content.

  3. {API Key}.txtThis filename is not fixed and is obtained from Bing Webmaster Tools.IndexNow API KeyDynamically generated. You need to use the API Key obtained as the filename and add.txtThe extension. At the same time, the content of the file must also be this API Key itself. For example, if your API Key isd2f0d24fc01e46c9be89c0d9b282227a, then the filename you need to create isd2f0d24fc01e46c9be89c0d9b282227a.txtThis is the content of the file isd2f0d24fc01e46c9be89c0d9b282227a.

Understanding this point, regardless of whether your AnQiCMS is deployed on a physical machine, virtual machine, or Docker container (even inside the Docker container's/app/publicThe path is mapped to the host machine, and the service provided to the outside world is still configured on the host machinepublicThe web server of the catalog, you can find the location of this file accurately. Just make sure that your web server is properly configured, and the domain points to the AnQiCMS project directory.publicThe folder, then the subsequent IndexNow API push verification can proceed smoothly.

By placing this file precisely, you have established a fast communication bridge between your AnQiCMS website and the Bing search engine, ensuring the timely discovery and inclusion of newly published content. This is undoubtedly a crucial step in improving the search engine performance of the website.

Frequently Asked Questions (FAQ)

  1. How do I confirm{API Key}.txtThe file has been successfully placed in the correct location?You can try to access the file directly in the browser. For example, if your website domain iswww.example.comAnd your API Key isabcdef12345Then please enter it in the browserwww.example.com/abcdef12345.txtIf the browser can display it.abcdef12345This string (i.e., the content of the file) means that the file path and the configuration of the Web server are both correct.

  2. If I use Docker to deploy AnQiCMS, thispublicwill the directory path be different?For Docker deployment, the AnQiCMS application itself runs inside the container, and its internal path may be like/app/publicBut when you reverse proxy containers through web servers like Nginx or OpenResty, it is usually the AnQiCMS project directory on the host machine that will be proxied.publicThe folder is mapped to the root directory of the Web server. So, you should still{API Key}.txtPlace the file on the host machine, inside your AnQiCMS project folder.publicIn the directory, the web server is responsible for exposing it to external access.

  3. Can I set a{API Key}.txtfor the file a more memorable name, or put it inpublica subfolder under the directory?Do not.Bing's IndexNow API has strict requirements for file naming and storage location.publicUnder the directory (i.e., the root directory of the web server).If the file name, file content, or placement in a subfolder is changed, the verification will fail, thus preventing the quick push of IndexNow.