Wordpress - How To Noindex Plugin Folders, But Not Block Them
I've searched but haven't found quite what I need. What I'm trying to do is noindex a plugin folders. Google for some reason has indexed a bunch of urls like this for example:
All that pulls up is a "Index of" page, so I'd like to get that and urls like it noindexed. I don't want to just block them with the robots file though because after reading the following article, it seems like a bad idea: WordPress robots.txt example for great SEO
There's also this to backup why blocking any css and js is a bad idea: Google Panda 4, and blocking your CSS & JS
There's no index file or anything like that, so I'm wondering if there's a way to get these noindexed. Perhaps the htaccess file?
You can use .htaccess file to add
For example create new .htaccess file inside plugins directory and put this code inside it will add the header to all the files inside the folder.
<IfModple create new .htaccess file inside plugins directory and put this code inside it will add the header to all the files inside the folder.
<IfModule mod_headers.c> Header set X-Robots-Tag "noindex, nofollow" </IfModule>
Make sure you have the headers modules installed / active.
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?