Remove Product & Category from URLS in Wordpress
-
Does anyone have experience removing /product/ and /product-category/, etc. from URLs in wordpress? I found this link from Wordpress which explains that this shouldn't be done, but I would like some opinions of those who have tried it please.
https://docs.woocommerce.com/document/removing-product-product-category-or-shop-from-the-urls/
-
Hi there,
I can't point you in a specific direction on how to go about doing this, but as Martijn mentioned it's important that you make sure:
- 301 redirects are setup from old URLs to new URLs (/cat-name 301s to /prod-name)
- ALL internal links are updated to /prod-name (for example, in the main navigation, footer, sidebars, etc.)
- I believe what Martijn meant with the URL depth comment was that websites (particularly ecommerce sites) should be structured logically (mainly for topical authority). So for example, if you are a site that sells electronics, it's important from both a user and bot perspective that there is a domain.com/laptops/ page (which would be the category page). Under that, it makes sense to have a product page that would live on domain.com/laptops/macbook for example. It sounds like you are considering to remove the top-level category pages, which might result in a worse user experience and possibly a less-than-ideal setup for link equity being passed down to product pages.
Martijn, is that what you were hinting at?
-
Any follow up?
-
Then when you click through to a product:
I have encountered no problems doing this in Opencart. No 301 redirects were needed because the plugin takes care of this itself.
I want to make sure that you're aware of the different internal structures in URL depth. That's probably why most people would advise you not to go this way.
I'm sorry, I'm not sure what you mean in respect to different internal structures or why the above would be an issue.
-
Hi,
You should be able to just change this in the permalinks. It's good to be reminded of some of the things that you need to take care of: redirects, making sure that all old links are pointing the new right way. But most of all, I want to make sure that you're aware of the different internal structures in URL depth. That's probably why most people would advise you not to go this way.
Martijn.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Why a certain URL ( a category URL ) disappears?
the page hasn't been spammed. - links are natural - onpage grader is perfect - there are useful high ranking articles linking to the page...pretty much everything is okay.....also all of my websites pages are okay and none of them has disappeared only this one ( the most important category of my site. )
Intermediate & Advanced SEO | | mohamadalieskandariii0 -
How would you address these URLS
Hey Mozzers, long time no post. Just a quick one for you regarding URLS, this is an example of a url on a site https://www.thisismyurl.co.uk/products/spacehoppers/special-spacehopper.html Many of these pages are getting flagged for having a url that is too long. The target of this page is "special spacehoppers". Should i be concerned with the url being to long given my keyword is at the end? Would this be a suitable idea? https://www.thisismyurl.co.uk/p/spacehoppers/special.html Would changing products to p be worthwhile? It would remove length from nearly all urls but would require a site wide re-direct. 2)Would removing the "spacehoppers" bit from the url be worth it? Yes it would shorten the url but would also remove the exact keyword from the url which could be detrimental to rankings.
Intermediate & Advanced SEO | | ATP0 -
When the site's entire URL structure changed, should we update the inbound links built pointing to the old URLs?
We're changing our website's URL structures, this means all our site URLs will be changed. After this is done, do we need to update the old inbound external links to point to the new URLs? Yes the old URLs will be 301 redirected to the new URLs too. Many thanks!
Intermediate & Advanced SEO | | Jade1 -
Should I nofollow my Wordpress tags?
I have a website that have a strong root domain (ranking on many terms) but the subpages (articles) doesn't rank well. My feeling is that the linkjuice is not flowing to them (not enough anyway). When I run site:http://mydomain.com I have my root as the first result and the next many results are tagpages on my sites. I have arund 180 index pages, and I need to go to down to result #50 give or take before I see any subpage using the site command. My website theme have the tags on every page possible. The tags are useful for my viewers, but not SEO useful, but I fear that they are dilluting my linkjuice. Should I nofollow and noindex them? Noindex makes sense (the tags are just duplicate content featuring snippets of text from the articles). But Nofollow would make sense too since I wouldn't send any linkjuice through the tags. What would you guys do? Bests regards
Intermediate & Advanced SEO | | claus101 -
Attack of the dummy urls -- what to do?
It occurs to me that a malicious program could set up thousands of links to dummy pages on a website: www.mysite.com/dynamicpage/dummy123 www.mysite.com/dynamicpage/dummy456 etc.. How is this normally handled? Does a developer have to look at all the parameters to see if they are valid and if not, automatically create a 301 redirect or 404 not found? This requires a table lookup of acceptable url parameters for all new visitors. I was thinking that bad url names would be rare so it would be ok to just stop the program with a message, until I realized someone could intentionally set up links to non existent pages on a site.
Intermediate & Advanced SEO | | friendoffood1 -
Urls in Bilingual websites
1-I have a bilingual website. Suppose that I am targeting a page for keyword "book" and I have included it in that page url for the English version: English version: www.abc.com/book Can I use the translation of "book" in the second language of the website url instead of "book" ? Please let me know which of the following urls are right " French Verison: www.abc.com/fr/book or www.abc.com/fr/livre livre=Book in French 2- Does Google have any tool to check if the second language page of the website has exactly the same content as the English version. What I want to do is for example for a certain page in English version, my targeted keyword is "book" . So my content would be around books. But in the French version of this page, I want to focus on keyword "Pencil" in French instead of "book". Is it wrong or any consequences? That was the main reason for the question number one. Because if it is ok to do what I explained in item 2 then I will set my urls like: In English : www.abc.com/book In French: www.abc.com/fr/crayon crayon=Pencil in French
Intermediate & Advanced SEO | | AlirezaHamidian0 -
Clean URL help!
Hi all, In short, i'm looking to redirect examplepage.html to examplepage .I've got rid of the .html, sitewide this morning. However I want to redirect Google & people who have bookmarked the old url structure. Currently if you have the extension on or not, it will show in your browser. I'm wanting /examplepage.html to 301 redirect to /examplepage I've gone the normal way I'd do it by adding in .htaccess: Redirect 301 /examplepage.html http://www.example.com/examplepage I'm assuming it isn't redirecting as the example.html page is no longer... what is the way around this? Thanks for any help! In firefox the error of the page is: The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
Intermediate & Advanced SEO | | Whittie0 -
URL Structure
URL i have to use targeted keyword on all sub page domain or not for example now i am using url like this format fundingtype.html litigation-funding.html legal-funding.html financingservices.html process.html and if i re-write all url with targated keyword like this format lawsuit-loans-fundingtype.html lawsuit-loans-litigation-funding.html lawsuit-loans-legal-funding.html lawsuit-loans-financingservices.html lawsuit-loans-process.html so which type URL are more effective for best SEO ??
Intermediate & Advanced SEO | | JulieWhite0