# Add Custom URLs to the All in One SEO Sitemap

> Adds pages that WordPress does not manage, such as static files or app routes, to All in One SEO's sitemap.

- Type: PHP
- Runs: Frontend only
- Category: [Plugin Integrations](https://wpide.com/library/category/integrations/)
- Tags: aioseo, sitemap, urls
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/aioseo-sitemap-additional-urls/

## Code

```php
// Paths to add, relative to the site root.
$wpide_aioseo_extra_paths = array( '/app/', '/pricing-calculator/' );

add_filter( 'aioseo_sitemap_additional_pages', function ( $pages ) use ( $wpide_aioseo_extra_paths ) {
    foreach ( $wpide_aioseo_extra_paths as $path ) {
        $pages[] = array(
            'loc'        => home_url( $path ),
            'lastmod'    => gmdate( 'Y-m-d H:i:s' ),
            'changefreq' => 'weekly',
            'priority'   => 0.6,
        );
    }

    return $pages;
} );
```

## Notes

Paths are relative to your homepage. AIOSEO Pro also has an "Additional Pages" setting.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Add Custom URLs to the All in One SEO Sitemap" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
