Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I get htdig not to index some directories, but still follow links?

0
10 Posted

How can I get htdig not to index some directories, but still follow links?

0

You can simply add the directory name to your robots.txt file or to the exclude_urls attribute in your configuration, but that will exclude all files under that directory. If you want the files in that directory to be indexed, you have a couple options. You can add an index.html file to the directory, that will include a robots meta tag (see question 4.15) to prevent indexing, and will contain links to all your files in this directory. The drawback of this is that you must maintain the index.html file yourself, as it won’t be automatically updated as new files are added to the directory.The other technique you can use, if you want the directory index to be made by the web server, is to get the server to insert the robots meta tag into the index page it generates. In Apache, this is done using the HeaderName and IndexOptions directives in the directory’s .htaccess file.

0

You can simply add the directory name to your robots.txt file or to the exclude_urls attribute in your configuration, but that will exclude all files under that directory. If you want the files in that directory to be indexed, you have a couple options. You can add an index.html file to the directory, that will include a robots meta tag (see question 4.15) to prevent indexing, and will contain links to all your files in this directory. The drawback of this is that you must maintain the index.html file yourself, as it won’t be automatically updated as new files are added to the directory. The other technique you can use, if you want the directory index to be made by the web server, is to get the server to insert the robots meta tag into the index page it generates. In Apache, this is done using the HeaderName and IndexOptions directives in the directory’s .htaccess file.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123