> For the complete documentation index, see [llms.txt](https://developers.weglot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.weglot.com/wordpress/use-cases/auto-switch-only-for-homepage.md).

# Auto switch only for HomePage

Since version 3.5, the auto-redirect (auto-switch) feature works on every page. For example, with a **French** browser:

* `/` is redirected to `/fr/`
* `/contact` is redirected to `/fr/contact`

To restrict the auto-redirect to the homepage only:

```php
// Add this using the "Code Snippets" plugin or directly in functions.php
add_filter( 'weglot_autoredirect_only_home', '__return_true' );
```
