I am trying to display ads on my web pages that have dynamic query parameters. E.g: https://app.example.com/converter?python2code=print%20g&python3code=print(g). Here the ?python2code=print%20g&python3code=print(g) part of URL is always changing.

How can I show ads there?

Note: According to google,

Dynamic pages with session IDs Sites that append a session ID to a user's URL may encounter problems displaying relevant ads. Session IDs can increase the load placed by our crawlers on one's server due to the manner in which our system indexes pages. We recommend removing session IDs from your URL to help resolve this issue.

These query parameters are very important I cant remove them.

  • When you say "always changing" do you mean that you have many such parameter values that each specify different content, or do you mean that the parameter value is temporary and the URL won't be valid in a short amount of time? Aug 26, 2021 at 9:27
  • @StephenOstermiller parameter is depend on user inputs Aug 26, 2021 at 9:30
  • Does each user input different things or is there going to be overlap between what users input? Aug 26, 2021 at 9:30
  • yes, users enter different things all the time! they can enter what they want no restriction Aug 26, 2021 at 9:33
  • What you have in your URL as query parameters are not "session IDs". Session IDs are typically random opaque values, often generated after authentication, but not necessarily, and most often in cookies (but can be as well in URLs, hence Google message). Sep 1, 2021 at 21:24

1 Answer 1


These pages are not a good fit for Google AdSense. You can try to put AdSense on the pages, but AdSense is probably not going to populate the ads very often and the ads are not going to convert well.

When you put ads on a page (URL), the Google Adsense crawler comes to visit the page to see what content that page has on it. You will see a hit in your access log for Mediapartners-Google visiting within a second of the first user visiting that page. After the Google sees what the content of the page is, it tries various ads with different users to see which ones convert well on that page.

When you have unique URLs for each user (because each user enters unique information,) Mediapartners-Google will have to crawl every page before displaying ads. Your site will quickly exhaust its crawl budget and ads will stop appearing on the pages. In addition, Google won't be able to optimize the ads on the pages over time, so the ads that do show up won't have as high a click-through-rate (CTR) as ads on pages that lots of visitors use.

  • I think this answer deserves a downvote because I know the reason I want a solution! just to be clear I have already seen some pages that are in the same situation and work with adsence properly. Oct 2, 2021 at 16:37
  • 1
    I don't think there's anything you can do about it. There are plenty of websites like this that use adsense and it works a little bit but there's nothing that you can do to make it work perfectly. Oct 2, 2021 at 20:52
  • @RohitNishad Stephen's answer is good, your expectations are unrealistic. You're asking for a way to put a square peg in a round hole. These things come with tradeoffs, if you want to use AdSense, you're going to have to change your URL conventions or find an alternative ad network that allows them. Oct 13, 2021 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.