msavard Posted February 21, 2023 Share Posted February 21, 2023 Is it possible to hide the URL to the various files in the site/assets/files directory from being indexed? For example, say I have a site at somesite.com. I have a PDF file that someone can download at somesite.com/site/assets/files/1376/mypdf.pdf. Is there a way to hide all that and just have the link be something like somesite.com/pdfs/mypdf.pdf? I guess it doesn't really matter, it just looks messy having all those site/assets/files/1075/etc/etc in there. Link to comment Share on other sites More sharing options...
wbmnfktr Posted February 22, 2023 Share Posted February 22, 2023 The easiest and fastest solution would probably be to disable/disallow indexing of PDFs: https://cloudpdf.io/blog/how-to-prevent-your-pdf-documents-from-being-indexed-by-search-engines (not the robots.txt way!) But... are those PDFs worth being indexed by Google or anyone else? If so you could look into URL hooks: https://processwire.com/blog/posts/pw-3.0.173/ Link to comment Share on other sites More sharing options...
gebeer Posted February 22, 2023 Share Posted February 22, 2023 You can make URLs to PDFs look nicer Further up in that thread, you can see how you can implement output. Link to comment Share on other sites More sharing options...
msavard Posted February 22, 2023 Author Share Posted February 22, 2023 Both great ideas. Thank you for pointing me in the right direction. I have so much to learn in the processwire universe! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now