Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Remove v=XXXX String From WordPress URLs

Recently, one of our WooCommerce users asked about removing the v=XXXX string from their WordPress URLs. These random numbers and letters appear as parameters in your permalinks, making URLs look messy.

Thankfully, we’ve found several simple ways to remove these version strings and clean up your WordPress URLs. In this guide, we’ll show you exactly how to do it, step by step.

Whether you’re optimizing for performance or just want tidier URLs, this tutorial will help you achieve your goal. Let’s get started with cleaning up those version strings.

How to Remove v=xxxx string from WordPress URLs

💡 Struggling with your WordPress website? You can hire a WordPress expert from WPBeginner Pro Services to redesign your site, make it secure, optimize it for search engines, and more.

Why Are You Seeing v=XXXX String in Your WordPress URLs?

The v=XXXX string appears on websites running an online store using WooCommerce. It is not a bug or an error but an actual feature of the WooCommerce plugin.

String with letters and numbers added to WordPress URLs by WooCommerce

The purpose of this string is to help WooCommerce calculate shipping and taxes based on a user’s geographic location. The string helps make the feature compatible with WordPress caching plugins like WP Super Cache or W3 Total Cache.

Now, if your store doesn’t require geolocation-based calculations for shipping and taxes, then this string may not be unnecessary. Plus, it’s good practice to simplify your site’s URLs and make them more SEO-friendly.

With that in mind, let’s take a look at how to easily disable and remove the random v=XXXX strings from your WordPress URLs. You can use the quick links below to skip to your preferred topic:

How to Remove v=XXXX String From WordPress URLs on WooCommerce Sites

First, you need to log in to your WordPress admin area and head to the WooCommerce » Settings page.

In the General tab, you need to scroll down to the Default customer location’ option.

The default customer location setting in WooCommerce

If the v=XXXX string appears on your site, then the default customer location will be set to ‘Geolocate (with page caching support).’ What you need to do is change it to either ‘No location by default’ or ‘Shop country/region’.

Finally, don’t forget to scroll down and click on the ‘Save changes’ button to store your settings.

Clicking Save changes in WooCommerce

If you are using a caching plugin, then you will need to clear your WordPress cache. You may also need to clear your browser cache.

After that, you can visit your website, and the geolocation string will disappear from your WordPress URLs.

How to Geolocate WooCommerce Customers’ Location Without the URL String

You may also want to enable the ‘Geolocate’ setting to charge your customers shipping and taxes according to their locations. This will not show the v=XXXX string in your WordPress website’s URLs.

Simply select the ‘Geolocate’ option in the ‘Default customer location’ dropdown. After that, click ‘Save changes’ below.

Geolocate without caching

Keep in mind that this default location option is not compatible with static caching plugins. Plus, it will show incorrect shipping and tax information to users due to a previously cached page.

Running WooCommerce without caching is not recommended because it will slow down your site’s speed and performance.

If you need to use the Geolocate default location to calculate shipping and taxes on the fly, then for the time being, you will have to tolerate the ugly v=XXXX string in your WordPress URLs.

For more details, please see our guide to geolocation targeting in WooCommerce.

Pro Tip: Want to see if your changes work on different browsers? Check out our step-by-step guide on how to test a WordPress site in different browsers.

Frequently Asked Questions (FAQs) About the v=XXXX String in WordPress URLs

Here are some of the most frequently asked questions about the v=XXXX string and geolocation in WooCommerce.

What is the v=XXXX string in WordPress?

WooCommerce creates the v=XXXX string to automatically calculate shipping and taxes for your customers around the world. The string is necessary if you are using a caching plugin on your WordPress website.

How do I use geolocation in WooCommerce?

To use geolocation in WooCommerce, you will need to go to WooCommerce » Settings » General and choose either ‘Geolocate’ or ‘Geolocate (with page caching support)’ from the ‘Default customer location’ dropdown.

Keep in mind that choosing ‘Geolocate (with page caching support)’ will add the v=XXXX string to your WordPress URLs. Additionally, selecting ‘Geolocate’ will not work if you are using a WordPress caching plugin.

How do I change my WordPress permalinks?

To set an SEO-friendly permalink structure for your WordPress website, you need to go to Settings » Permalinks. Here, we recommend that most sites choose the ‘Post name structure’ setting or create a ‘Custom’ structure.

For more details, please see our guide to SEO-friendly URL structures in WordPress.

We hope this article helped you learn how to remove the v=XXXX string from your WordPress URLs. You may also want to see our list of the most common WordPress errors and our beginner’s guide to troubleshooting WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

71 CommentsLeave a Reply

  1. This post a lifesaver! Those “v=xxxx” strings were driving me crazy, but this fix is fantastic. The clear steps to change the “Default customer location” setting were perfect.

    As a fellow online store owner, I appreciate the reminder about clean URLs for SEO. Disabling geolocation sounds like a great option for stores that don’t need it. Thanks for the info!

  2. Why is this v=xxxx string on all pages? It’s only needed at the check-out. I do use WP Rocket cache and ship to different zones.

    • That string is used to store the information which is why it stays on every page for the user.

      Admin

  3. Thank you for this informative guide!
    I’ve been running a WooCommerce store since back then in 2023 Jan for my t-shitrs, and those pesky v=xxxx strings in my URLs have been bugging me.

    I appreciate the clear step-by-step instructions on how to get rid of them.

    As an online store owner, I understand the importance of having clean, SEO-friendly URLs. Those random strings not only look unprofessional but could also potentially hurt my search engine rankings.

    I’m glad to know that removing the strings is a simple process of changing the ‘Default customer location’ setting in WooCommerce. It’s good to have the option to disable geolocation if my store doesn’t require it.
    Thanks again for this valuable information!

  4. OMG!! Thanks a lot!! it freaks me out
    but the thing is that does the V### code affect web Search ranking?

  5. The problem is, I didnt know about this ulr change until I logged out of WP. Now I am unable to log back in. What do I do???

  6. OMG!!!!! This just made my day. I have been trying to figure this out since forever. thank you guys so mcuh !!!!!!!!!!!!!

  7. Wow! worked like magic. I have been fruastrated for weeks trying to figure this out – I thought it was my Theme.
    Thank you for helping me out.

  8. Ohhhh MG! I just “adopted” a website and no one knew why this was. They had a strange theme previously and had over 30 plugins. I’ve been searching files, scouring the waterfall, spent HOURS digging in FTP never once thought it was caused by this.
    THANK YOU SO MUCH!

  9. Thanks for such informative article. By mistake, I switched the option for Geo-Location Caching and started this error. Thanks for this wonderful piece.

  10. Wow! I’m very happy now , I never thought I would remove minemine, my mind is at rest now . Thank you so much boss.

  11. Awesomeeeee! I’ve never thought that the ?v= parameters on all my pages came from woocommerce, I was struggling with w3 cache and other plugins and it was woocommerce! thanks!!!

  12. Please Update the article How Install and setup Facebook Instant Articles?
    It is totally changed now.

  13. Can you make a tutorial on – how to make sidebar “I need help with” that is a very good programming

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.