: What should be in index files in unused subdirectories? What's the best practice for index pages in subdirectories which aren't being used (have no content)? Example root/subfolder/index.html My
What's the best practice for index pages in subdirectories which aren't being used (have no content)?
Example
root/subfolder/index.html
My thoughts were to set up a redirect to either the 404 page or the homepage.
More posts by @Candy875
2 Comments
Sorted by latest first Latest Oldest Best
You can remove the index.html file entirely for that location. That will usually cause a 404 message to occur.
Sometimes the server is configured to print a directory list instead. If that is the case, it can usually be disabled with Options -Indexes in the .htaccess file.
Remove it and let it 404. You can ultimately redirect to the home page or another appropriate page if there is any value to the traffic, but that would have to be a rather high value in my opinion. I find more value in making a clean site with 404's where there is nothing to see. Google prefers 404 over 301 redirect when there is no content. However, Google will also tell you to recover valuable traffic with 301 redirects to satisfy user requests. It is about the user. Low value pages annoy users- let alone search engines discounting the page and sites with too many low value pages. Your call. Do what is best for users first and search engines second. But do not host low value pages if you can.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.