Your Drupal robots.txt Changes Aren't Showing Up: Here's Why

https://hackernoon.imgix.net/images/IO69gv8W6RUFb2xGQu7nv0kowxQ2-9p9389g.jpeg

You've installed the robotstxt module, made your changes in the Drupal admin at /admin/config/search/robotstxt, cleared the cache, run cron — and the live robots.txt file is still showing old content. Before you go down a rabbit hole, here are the most common culprits.

1. Composer Scaffold Is Regenerating the File on Every Deploy

If your project uses robots.txt (which most Composer-based Drupal projects do), robots.txt is one of the scaffold files it copies into your webroot on every composer install. This means even if you delete it manually, it comes back on the next deploy, silently overriding the robotstxt module every time.

The fix is to tell the scaffold plugin to skip robots.txt entirely. In your composer.json, add a false entry for the file under file-mapping:

"drupal-scaffold": { "file-mapping": { "[web-root]/robots.txt": false }, "locations": { "web-root": "web/" }}

If your project already has a file-mapping section, just add the robots.txt...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE

Read more

https://cdn.mos.cms.futurecdn.net/idpsZZhdNRpeivNkS6A56g-2000-80.jpg

Trump backs Flock license plate cameras — but new survey reveals 47% of US public oppose them as 3 police officers are arrested for alleged 'misuse' of the tech

* US President Donald Trump says he supports Flock’s license plate cameras * Most Americans oppose the installation of the devices, a survey suggests * Several police officers have been arrested after abusing Flock tech Flock’s automated license plate recognition (ALPR) cameras are continuing to hit the headlines, with the latest