---
title: Block robots.txt and .htaccess file editing from WordPress admin
url: "https://www.seopress.org/support/guides/block-robots-txt-htaccess-file-editing-wordpress-admin/"
lang: en-US
updated: 2023-07-18
---

# Block robots.txt and .htaccess file editing from WordPress admin

To block robots.txt file editing from **SEO**, **PRO,** **Robots.txt** tab, copy and paste this to your `wp-config.php`:

```
define('SEOPRESS_BLOCK_ROBOTS', true);
```

To block .htaccess file editing from **SEO**, **PRO,** **htaccess** tab, copy and paste this to your `wp-config.php`:

```
define('SEOPRESS_BLOCK_HTACCESS', true);
```
