Link to home
Start Free TrialLog in
Avatar of sharingsunshine
sharingsunshineFlag for United States of America

asked on

How To Change Search URL After Permalink Change

I am needing to change the search url after I change the permalink assigned to my products.

I have a permalink situation on my products when I fix the permalink change.  The free version of wordpress search still shows the old url even purging the cache.  By the way, I have changed settings -> permalinks saved it and then put it back to my normal settings and saved it again.  All the while purging the cache.

Here is a screenshot

User generated image if you look at the last product in the slug I took away the "-8" hoping it would default to the correct slug.  However it still faults to the old content id 3276?.  I thought the normal url was supposed to default to the non appended -[number] option?

FYI I have to have separate sku's for each offer with the vendor I am using thus the reason for the numerous slugs being appended with various numbers.

If you want to look at the one of the products in question it is at
https://www.theherbsplace.com/product/skeletal-strength-p-535-8/

I have several products that have appended -numbers on their slug which is causing the search engine to bring up other product slugs instead of the product that is in stock and available for sale.
Avatar of Mohan Nirkhede
Mohan Nirkhede
Flag of India image

I checked your link search is working fine.
The URL you provided gives back a 404.

imac> realurl --debug https://www.theherbsplace.com/product/skeletal-strength-p-535-8/
# DEBUG: realurl(): cmd: curl -s -I -L https://www.theherbsplace.com/product/skeletal-strength-p-535-8/ 2>&1
# DEBUG: realurl(): HTTP/2 404 
https://www.theherbsplace.com/product/skeletal-strength-p-535-8/

Open in new window


Note: Be very careful changing permalinks, as you can create many site performance issues doing this.

Changing permalinks creates a mass 301 injection into your database, where every old link now has a 301 to a new link.

Each time you change your permalinks setting, another mass 301 layer gets installed.

Once you have a single layer of 301s installed, then page caching breaks... so... for high traffic sites, best consult with someone who knows how to make mass site changes, while preserving site speed.

There is no one way to accomplish this, so likely hire someone will be the way you go.

Alternatively, if you have low traffic now + will never have high traffic to your site, you can change permalinks as you like + just ignore the performance penalty.
ASKER CERTIFIED SOLUTION
Avatar of sharingsunshine
sharingsunshine
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial