Instead of showing a 401, why not just add the URL to a robots.txt and the search engine will ignore it from indexing.
You could also manually add to the headers a meta robots to noindex the page.
You could run this via .htaccess to redirect a page to somewhere else (or show 401), but that would show for both users and search engines.
Related Posts:
- Custom Post type & Taxonomy URL structure
- Combining Multiple Taxonomies in one URL
- Dynamic taxonomy in permalink made all other posts NOT FOUND?
- Remove taxonomy slug when not assigning taxonomy with custom post types
- Remove Taxonomy Slug when No Taxonomy is Assigned to Custom Post Type?
- Custom Permalink with Dynamic Taxonomy for Custom Post Type – Works, but breaks other permalinks
- Custom Taxonomy breaking pages permalinks
- Custom Post Type with two hierarchical Custom Taxonomies: strategy to generate best permalink structure
- create a subcatagory for a custom post type and out put url as posttype/subcategory/item
- Custom Post Type Advanced Slug
- Custom post type URL structure with site.com/custom_taxonomy_slug/post_name
- Get full control over custom post type url
- Remove Custom Taxonomy Slug only without removing Custom post type slug in permalinks
- Custom Post Type with multiple Custom Taxonomies / Hide Taxonomy Slug from URL
- Is it possible to use a post name in a custom post slug?
- How to correctly edit permalink structures for both default and custom posts/taxonomies?
- Custom Post Types, URL rewrite on multiple CPTs
- How to hook custom taxonomies to custom post types and make the permalinks work?
- Get Taxonomy Term Title by it’s URL
- Child post with numeric only slug keeps redirecting to parent
- How to add a post slug to a url?
- Custom post type url with category
- Adding custom post category slug in permalink causes 404 error for pages and posts
- Remove the parent slug in a CPT URL
- Permalink for a custom post type isn’t working and I don’t know why
- How Can I Change the Custom Post Type Slug to the Taxonomy Slug in the URL?
- Use same slug base for Custom Post Type posts, and multiple taxonomy terms
- How to have the same url structure for both a CPT and a Taxonomy?
- How to create custom url structure based on custom post type rewrite slug, taxonomy and category slug?
- custom-taxonomy/post_name instead of the default post_type/post_name
- Show custom post archive when custom post not specified
- Show custom post type relationships by taxonomy
- How can I make the slug of the taxonomy also the slug of the custom post
- Assign same parrent Page to pages AND custom post types
- Can’t remove front from permalinks for custom taxonomy category page
- Allow duplicate slugs for custom post type with taxonomies
- Removing custom post type slug from URL
- Nested Custom Post Type or Custom Post Type Parents?
- Customize Custom Post Type URL
- Create a custom php page and load it at a specific slug
- Permalinks /country/city/cpt/postname/
- Seamless permalinks between Custom Taxonomy and Custom Posts
- Custom post type and custom taxonomy with the same slug using the file page taxonomy only as directory
- Custom Permalinks with CPT and Hierarchical Taxonomies
- How to have this permalink structure: post_type/postname/custom_inner_page
- Custom Permalink Structure for Custom Post Type, Custom Taxonomy, Under a page
- Custom taxonomy returns 404
- Including taxonomy term before post type breaks top level pages
- Permalinks: custom post type -> custom taxonomy -> post
- CPT’s with landing page instead of archive – Url Rewrite?
- How to change permalink to include custom post type
- Custom post type, permalinks, taxonomies and blog posts
- Custom post type permalink tag 404
- Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)
- permalink /category/post-name with custom post type and taxonomy
- Custom post type and taxonomy permalinks
- Hierarchical permalinks for custom post type and taxonomy
- set permalink for CPT
- Custom Post Type – Duplicate Page Slugs
- Taxonomy in URL
- Custom permalink with child taxonomy terms
- Custom post type Permalinks with hierarchical Taxonomies
- Remove permalink for custom post type
- How to solve this custom post type goes to 404 page?
- Best way to specify “article type” in URL
- Template files for Custom Post Type and Taxonomy
- How do you create %post_type%/%postname%/ permalink structure?
- Rename a slug label
- Different slug taxonomy for two different CPT
- Can’t use pagination with custom taxonomy
- retrieve permalinks of posts inside custom post type by using post ID
- How to add current custom taxonomy slug to body class
- Using page slug in wp_query
- Listing all slugs?
- Template for custom post type when taxonomy is in the URL
- Permalink problems with custom post type and custom taxonomy
- How to filter a custom post type by custom taxonomy without 404
- How to get all posts related to particular category name on button click?
- Changing CPT slug and taxonomy already registered in parent theme
- Custom Post Type to replace Woocommerce products – page not found error
- WordPress custom permalink and archive link for custom post type
- Ideas on how to organize a project [closed]
- Enabling permalinks disables custom page template
- Need to return a string as permalink insted of str_replace
- Change permalinks for custom post type based on taxonomy term
- Under What Conditions Can I name my CPT the same as my CPT Page?
- Custom Post Type URL Rewrite’s
- Using page title as a link to term archive
- Custom post type category permalinks and archive pages
- Is it possible to have hierarchical taxonomy and hierarchical custom post types in one permalink?
- Custom category URL not displaying posts
- Safe to throw 404 error in request filter?
- Multiple permalinks for a single post with multiple taxonomies
- Duplicate slug/permalink issue while adding same post name
- How do I set a post slug automatically based on taxonomy?
- Custom post type and multi taxonomies + customize url
- how to achieve this permalink abc.com/CPTName/CustomPostTypeCategorySlug/categoryname
- Custom Permalink For Custom Post Type – Working Fine But Broken For Pagination
- Set priority to permalinks
- I want to rewrite the URL of a specific post with a specific custom field to easily analyze in Google Analytics