Check URLs for Query Strings

Check URLs for Query Strings

In social media, emails, Site Info docs, and more, I see folks using links that have inappropriate query strings on them.

You’ll want to know when to use a string and when to truncate it.

Query Strings Not to Use

This is the login URL for a WordPress site:
https://somesite.com/wp-login.php

And this is the query string URL that appears after you log out
https://somesite.com/wp-login.php?loggedout=true&wp_lang=en_US

See the ? after the slug – that, and everything that follows is a query string of a type that you would not want to use anywhere.

UTM Strings

Here’s an example of a UTM tracking string:
https://www.searchenginejournal.com/google-says-ai-generated-content-is-against-guidelines/444916/?utm_source=facebook&utm_medium=social&utm_content=news-seo&utm_campaign=facebook-auto-publish&fbclid=IwAR1XhuHjCy5lmZwqHKie5RZfi1HNBJf3dH_MvHZB_XEpW1aKMYuCtjMEI4w

This URL is from a post I saw on Facebook. They are using a UTM tracking code on it, and that is what is after the ? in the string.

If you use UTM codes, then you need to include the whole string.

But, if you wanted to share this link from Search Engine Journal somewhere, you would want to leave off everything after the slug, like this:
https://www.searchenginejournal.com/google-says-ai-generated-content-is-against-guidelines/444916/

Query Strings to Use

This is an Amazon link on my Heartwood Art site to the search page for hammers:
https://www.amazon.com/s?k=mallet&language=en_US&linkCode=sl2&linkId=1b338ddace2e1840cd1cff0a4094b66b&tag=hwa01-20&ref=as_li_ss_tl

See the s? after the slug – that is for a search page and it is required to take folks to the right page on Amazon.

So in this case, you need to leave that query string intact when sharing the link.

Jump Links / Anchor Links

Here is what a jump link looks like:
https://blogaid.net/wp-fastest-cache-settings/#lazy-load

See the # after the slug – that is an indication that it is part of an anchor link.

This will take you to the lazy load section of the WP Fastest Cache tutorial post on BlogAid.

Check Your URLs

  • the bookmark URL for sites that you log into
  • the URL you are sharing on social media, in your emails, and on your sites