Want first variant to load in the URL when user clicks into product page

Currently when a user clicks on a product they get a url like this:

https://www.blahblah.com/products/the-bike-caravan

with the first variant selected in the drop down/pills but not in the url.

Is there a way to get the page to load like this instead with the first variant listed in the url:

https://www.blahblah.com/products/the-bike-caravan ?variant=42446391869699