I have a URL like www.example.com/store/
, which leads to a store page
When a user clicks on a discount link, it adds the parameter ?discount=foo
, so my link looks like this: www.example.com/store/?discount=foo
.
Everything is functional. But is it bad practice to have the forward slash before the query string in this situation?
As a matter of modern spec, yes, it is permissible to skip the slash, contrary to what the accepted answer here claims.
Trailing slashes can be bad for the user experience Whether a URL has a trailing slash or not, it's viewed as a unique and individual web page. If the same URL exists both with a trailing slash and without one, it means the content on the page could technically be different.
Google does not care whether or not you use a trailing slash in your URLs. The thing that does matter is how you use them – Google counts each one as a different URL.
The short answer is that the trailing slash does not matter for your root domain or subdomain. Google sees the two as equivalent. But trailing slashes do matter for everything else because Google sees the two versions (one with a trailing slash and one without) as being different URLs.
It’s valid:
/
).?
) in the URI.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With