Using Custom URL Filters to exclude multiple posts and pages from Mediavine Tools
Custom URL Filters allow you to exclude a large group of your pages, in bulk, from Recommended Content widgets, Search results, and Automailer emails.
How to set up Custom URL Filter Exclusions
Step 1: In your Publisher Dashboard, go to Tools > Exclude Pages. From there you'll see the Custom URL Filters section.
Common URL structures are automatically excluded:
- /category/ , /categories/ , /tag/ , /tags/
- /page/ - i.e. /page/2/
- Your site's homepage
- /about/
- /privacy-policy/
- /contact/
Important Notes:
-
-
These filters will only work if they match the verbiage entirely so an "about-me" page may still appear since it isn't just "about."
-
Subpages/subcategories are included in the filters. So, for example, if you have a URL structure where the category name follows the /category/ like
www.yoursitename.com/category/category-name/, you won't need to exclude each category individually. -
You can delete any of the existing filters to let those pages appear in Recommended Content. You can also delete any of the filters you add at a later date.
-
Step 2: Click Add New and write your Filter(s).
Custom URL Filters use something called “regular expressions” or “regex” to specify these filters. Adding in regex exclusions looks like it could be complicated, but here are a few examples to get you familiar.
Example 1We want to exclude any of our Review pages from Recommended Content. Our URL structure for that is:
https://yoursitename.com/reviews/
We'll want to add a Custom URL Filter for the following:
.*/reviews/.*
Using the URL filter above, it would exclude https://yoursitename.com/reviews/ along with any pages in the reviews category like https://yoursitename.com/reviews/example-post-1 and https://yoursitename.com/reviews/example-post-2.
We want to exclude any monthly archive date in the URL. Here's our URL structure for that:
https://yoursitename.com/2020/03/
https://yoursitename.com/2017/12/We'll want to add a Custom URL Filter for the following:
.*/20[0-9]+/.*
A note for this example: if you have dates in your URLs, like https://yoursitename.com/2020/04/this-is-a-post, the above filter would also exclude those posts.
We want to exclude our subscription or purchase landing pages. Here's our URL structure for that:
https://yoursitename.com/thanks-for-subscribing/
https://yoursitename.com/thanks-for-purchasing/We'll want to add a Custom URL Filter for the following:
.*/(thanks-for-subscribing|thanks-for-purchasing)/
Step 3: Make sure to Save Changes after you've added your filter(s).