There are a few ways to hide website directories from search engines without using robots.txt:
It's worth noting that while these methods can help prevent search engines from indexing directories, they won't necessarily keep them completely hidden. If someone knows the URL of a directory, they may still be able to access it directly.
Additionally, if you want to completely hide the directory from public view and make it inaccessible to anyone without explicit access, you can use server-level configurations such as using a secure server setup (HTTPS) or firewall rules. However, these options may require advanced technical knowledge or assistance from a web developer or server administrator.