---
title: Output canonical URL on noindex pages
url: "https://www.seopress.org/support/hooks/output-canonical-url-on-noindex-pages/"
lang: en-US
updated: 2026-10-20
hook_name: seopress_titles_canonical_on_noindex
required_version: 10.3
---

# Output canonical URL on noindex pages

- **Hook name:** `seopress_titles_canonical_on_noindex`
- **Required version:** 10.3

```php
<?php
// Keep the canonical tag on noindexed pages (default: omitted).
add_filter( 'seopress_titles_canonical_on_noindex', '__return_true' );
```

Source: [https://gist.github.com/wp-seopress/16230dc953f209e6848d4ba1788397b8](https://gist.github.com/wp-seopress/16230dc953f209e6848d4ba1788397b8)


Register the filter early (functions.php or a plugin), before `wp_head` runs. It does not change the robots meta.
