What Are URL Parameters (Query Strings)?
If you came across this page, you were probably searching for something like “What are URL parameters?” or “What are query strings?”. They are usually used to track a user’s clicks from certain sources. It allows you to see what source users used to come to your website. Some sources might include:
- Organic (Search Engine Optimization)
URL parameters can also be used to track users once they are on your website. You could embed a parameter within your form button, you could use it in your filter list if you are an e-commerce site, or you use it almost anywhere else that you see fit.
How Do I Identify Parameters To a URL?
First, I will explain how to identify a URL parameter and then I will explain how to add a parameter to your own site.
URL parameters always start with a question mark but also include an equals symbol within the URL. For example, on our Google My Business listing, we include a URL parameter to help us tell how many people are coming from Google My Business and see where they are going on our website. In the example below, I show which part of the URL was our domain name, and which part was the URL parameter.
You can see that the “?” marks the beginning of the URL parameter, and that the question mark shows the source of our traffic. Although ours starts with “?utm_source”, many URL parameters begin with “?s” or “?q” to define the search parameters.
How Do I Specify Parameters in a URL?
As mentioned above, almost all URL parameters start with a “?” and include an “=” somewhere in the URL. To create one for yourself, you could do it manually by looking at others and inputting your own information.
However, the way we at The MarketingU create URL parameters is by going to this website and filling in the information. We prefer this one because it allows us to get more granular than more popular websites like this one. You must fill in your website URL, campaign source, campaign medium, and campaign name which we will go over now.
- Website URL: Your website URL is the entire URL of the page that you are trying to set up tracking for. If you are setting it up for your contact page you would put that page in the top.
- Campaign Source: Your campaign source is going to the platform that you are putting your URL on. In our example above, we were putting it on Google so we set the campaign source to this.
- Campaign Medium: Your campaign medium is the part that shows how the user is finding your website. This might be through a cost-per-click campaign, or through social media, or any other medium that you have.
- Campaign Name: Your campaign name is where you will get a little bit more specific. In our example, Google My Business was the campaign name because that is the URL that we use on our listing. You could set your campaign name to be the promo code of a campaign that you are running, or a specific product.
When creating the source, medium, and name, always use an underscore (_) between words to prevent Google from automatically applying a “%20” between each word.
If you decide to use the website that we mentioned above, you can also fill in the campaign term and campaign content to get even more granular. Just remember that in Google Analytics, you will be able to see the source, and then after you click on that, you will see the medium, and then finally the campaign name.
Why are URL Parameters Usually Used?
URL parameters are usually used for the following purposes:
- Tracking: This is the example that we used above. URL parameters can be used to track the source of the traffic to your website.
- Filtering: URL parameters can be used to filter the products on an e-commerce website. When you are shopping, you have probably tried to filter the products by price, color, brand, or anything else. URL parameters are used to do this.
- Reordering: Similar to the filtering use, you can also use URL parameters to reorder content. You have probably tried to reorder the products by price, deal, or most relevancy.
- Translations: You can use URL parameters for translations. For example, if you have an English and a Spanish version of your website, you would be able to allow users to click which version they want to see.
- And More
Common Issues with URL Parameters
If you do not do it correctly, URL parameters can become an issue for search engine optimization. While Google is getting better at understanding that URL parameters are used for tracking, you could still run into issues if not used correctly.
Keyword cannibalisation is one of the biggest issues you could face when using these parameters. This happens when multiple pages are targeting the same or similar keywords. Google and other search engines can struggle to decide which pages to show which is why we always suggest creating in-depth (1000+ word content) instead of four 250 word pieces.
URL parameters can create duplicate content on your website if not used correctly. For example, if you were to use an URL parameter to reorder your page, all the same products and content would be on there which is not different enough in Google’s eyes.
How to Fix URL Parameter Issues
To fix URL parameter issues you can try a few different options.
Get Rid of Some Parameters
If you do not need all the URL parameters that you currently have on your website, we suggest just eliminating them. This is the easiest way to fix your URL parameter issues. By putting your website into a program like ScreamingFrog and filtering the URLs for a “?”, you will be able to find the pages with parameters.
Only Use Them When Necessary
While the above talks about removing URL parameters, you could also stop using them when they are unnecessary. Although this is a very simple idea, not everyone thinks of it so I wanted to include it in this list.
Use The Canonical Link Attribute
While this is a little bit more complex since you need a basic understanding of coding, this is a great way to keep your URL parameters while also avoiding the problem. The canonical link attribute tells search engines that different pages have the same content and asks them to consolidate the ranking signals.
There are 2 main problems with using the canonical links attribute:
- They waste crawl budget. Google allotts each website a certain crawl budget. This means that they will only crawl a certain number of pages and if a bunch of your pages have URL parameters with the canonical link attribute, this eats up some of the budget allotted to your website.
- They do not ALWAYS work. The canonical link attribute asks search engines to consolidate all the pages but that doesn’t mean that they definitely will.
Use A Robots.txt File
A robots.txt file will tell search engines that there are duplicate pages and that they should not crawl them. While it doesn’t remove existing pages from the index, it does help avoid duplicate content issues. When used correctly, Robots.txt will tell Google to skip over the page which allows you to have them crawl the more important pages instead.
You can learn more about ways to avoid URL parameters issues here.
The Bottom Line
The bottom line is that URL parameters are great if you are trying to track users who are coming from sources such as Facebook, Google My Business, or an email campaign that you created. They can, however, be a headache for SEOs who are working on e-commerce sites due to the duplicate content that they create, and the keyword cannibalization issues.
If you want to learn more about how The MarketingU can help you avoid URL parameter issues, reach out to us!