Documentation for SEO-friendly Vanity Search URL for WooCommerce
SEO Friendly Vanity Search URL transforms ugly WordPress search URLs into beautiful, SEO-friendly permalinks. Instead of displaying /?s=search-term, your visitors will see clean URLs like /search/search-term/ or /products/search-term/.
Installation
-
Download the plugin ZIP file
-
Go to Plugins ➤ Add New ➤ Upload Plugin
-
Upload the ZIP file and click Install Now
-
Activate the plugin
Configuration
All settings are conveniently located in the WordPress Permalink Settings page.
-
Go to Settings ➤ Permalinks in your WordPress admin
-
Scroll down to the "Vanity Search URL" section
Settings Overview
Post/Page Search Settings
| Setting | Description | Default Value | Placeholders |
|---|---|---|---|
| Post/Page Search URL Slug | The URL segment for post/page searches | search |
N/A |
| Post/Page Search Title | Custom title for search results pages | Explore "%1$s" at %2$s |
%1$s = search term, %2$s = site name |
| Post/Page Meta Description | Meta description for search results | Results for "%1$s" at %2$s. |
%1$s = search term, %2$s = site name |
WooCommerce Product Search Settings (if WooCommerce active)
| Setting | Description | Default Value | Placeholders |
|---|---|---|---|
| Product Search URL Slug | The URL segment for product searches | products |
N/A |
| Product Search Title | Custom title for product search results | Explore "%1$s" at %2$s |
%1$s = search term, %2$s = site name |
| Product Meta Description | Meta description for product search | Results for "%1$s" at %2$s. |
%1$s = search term, %2$s = site name |
| Redirect Simple Searches | Redirect basic product searches (no filters) | Enabled | N/A |
| Redirect Sorted Searches | Redirect searches with sorting/filters | Disabled | N/A |
Reset Options
| Setting | Description |
|---|---|
| Reset Vanity Search Settings | One-click restore of all default values |
Saving Settings
-
Configure your desired settings
-
Click Save Changes at the bottom of the Permalinks page
-
Your vanity URLs are now active!
How it works?
URL Transformation
Before:
https://yoursite.com/?s=blue-widgets https://yoursite.com/?s=red-shoes&post_type=product
After:
https://yoursite.com/search/blue-widgets/ https://yoursite.com/products/red-shoes/
Redirect Logic
The plugin intelligently handles search redirects:
-
Simple Searches: Always redirected to vanity URLs
-
Filtered Searches: Configurable redirect based on settings
-
Single Results: Preserves WordPress core redirect to product page (for WooCommerce)
Usage Examples
Basic Search
Search for: "summer dresses" URL: https://yoursite.com/products/summer-dresses/ Title: "Explore 'summer dresses' at My Store" Meta: "Results for 'summer dresses' at My Store."
Multiple Words Search
Search for: "wireless headphones" URL: https://yoursite.com/products/wireless-headphones/ Title: "Explore 'wireless headphones' at My Store"
Post/Page Search
Search for: "contact information" URL: https://yoursite.com/search/contact-information/ Title: "Explore 'contact information' at My Store"
WooCommerce Integration
Smart Redirect Settings
Redirect Simple Searches
-
Purpose: Redirect basic product searches without filters
-
Example:
/products/blue-shoes/ -
Recommended: Enabled
Redirect Sorted Searches
-
Purpose: Redirect searches with sorting/filter parameters
-
Example:
/products/blue-shoes/?orderby=price -
Warning: May affect WooCommerce functionality
-
Recommended: Disabled
Compatibility
-
WooCommerce HPOS (High-Performance Order Storage)
-
WooCommerce product filters
-
WooCommerce sorting options
-
WooCommerce price/rating filters
SEO Benefits
1. Keyword-Rich URLs
Instead of: /?s=blue-widgets
You get: /search/blue-widgets/
2. Custom Titles
Control exactly how search result pages appear in search engines:
<title>Explore "blue widgets" at My Awesome Store</title>
3. Custom Meta Descriptions
Optimize your search result snippets:
<meta name="description" content="Results for 'blue widgets' at My Awesome Store.">
4. Clean URL Structure
-
No query strings
-
Hyphen-separated terms
-
Consistent URL patterns
FAQ
Q: Will this affect my existing search functionality?
A: No! All search functionality remains intact. The plugin only changes how the URLs look and handles redirects.
Q: Can I use different slugs for different post types?
A: Currently, the plugin supports separate slugs for posts/pages and WooCommerce products.
Q: What happens to search filters and sorting?
A: By default, complex searches (with filters/sorting) are not redirected. You can enable this in settings, but test thoroughly.
Q: Does this work with other SEO plugins?
A: Yes! The plugin integrates seamlessly with popular SEO plugins like Yoast, Rank Math, and All in One SEO.
Q: Will this break if I change my permalink structure?
A: No, the plugin uses WordPress rewrite rules and adapts to your permalink settings.
Q: How do I translate the settings?
A: The plugin is fully translatable. Use Loco Translate or your preferred translation plugin.
Troubleshooting
Issue: URLs not redirecting
Solutions:
-
Go to Settings ➤ Permalinks and click Save Changes (flushes rewrite rules)
-
Clear any caching plugins
-
Verify settings are saved correctly
Issue: Single product not redirecting to product page
Cause: This is by design to preserve WordPress core behavior
Solution: If you want all searches to use vanity URLs, contact support for customization options
Issue: 404 errors on vanity URLs
Solutions:
-
Re-save Permalinks
-
Check for conflicting plugins
-
Ensure Apache/Nginx has mod_rewrite enabled
Issue: Redirects not working with filters
Solutions:
-
Enable "Redirect Sorted Searches" in settings
-
Test thoroughly as this may affect functionality
