Title: Exclude specific URL?
Last modified: February 18, 2021

---

# Exclude specific URL?

 *  Resolved [GregW](https://wordpress.org/support/users/gwmbox/)
 * (@gwmbox)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/exclude-specific-url/)
 * Is it possible to exclude a specific URL from the sitemap/indexing/following?
 * I know there are settings in a page, but here I am using Ultimate Member. The
   member pages all use a page called Member and the data from UM is then inserted
   on those pages.
 * So for example;
 * [https://mysite.com/member/username](https://mysite.com/member/username)
 * Since the /username is not an actual page, it just uses the ‘Member’ page settings.
 * But I need to exclude some specific users.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/exclude-specific-url/#post-14087492)
 * Hi Greg!
 * This should do, it’ll apply noindex to the user pages:
 *     ```
       add_filter( 'the_seo_framework_robots_meta_array', function( $meta, $args, $ignore ) {
   
       	if ( null === $args && function_exists( 'um_is_core_page' ) && um_is_core_page( 'user' ) ) {
       		$meta['noindex'] = 'nonindex';
       	}
   
       	return $meta;
       }, 10, 3 );
       ```
   
 * If you want to be specific with users, then you’ll have to add more extensive
   calls in the filter, for example:
 *     ```
       if ( um_is_core_page( 'user' ) && um_get_requested_user() ) {
       	um_fetch_user( um_get_requested_user() );
   
       	// To see user() properties, peruse https://github.com/ultimatemember/ultimatemember/blob/2.1.15/includes/core/class-user.php
       	// Example: Set noindex for user ID 42.
       	if ( 42 === UM()->user()->id ) { 
       		$meta['noindex'] = 'nonindex';	
       	}
   
       	um_reset_user();
       }
       ```
   
 * I hope this kickstarts your idea! Cheers 🙂

Viewing 1 replies (of 1 total)

The topic ‘Exclude specific URL?’ is closed to new replies.

 * ![](https://ps.w.org/autodescription/assets/icon.svg?rev=3000376)
 * [The SEO Framework – Fast, Automated, Effortless.](https://wordpress.org/plugins/autodescription/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autodescription/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autodescription/)
 * [Active Topics](https://wordpress.org/support/plugin/autodescription/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autodescription/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autodescription/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/exclude-specific-url/#post-14087492)
 * Status: resolved