Hi everyone,

I am curious to know whether google travels dynamic query string e.g

i.e a string containing ? mark in the url.

Also, i wanted to know that if i am using comment section in my source code (View source code), does google spider crawl that particular comment section

Dani AI

Generated

Short answer: query-string URLs are crawlable, and HTML comments are not reliable places for content you expect to be indexed. As asked, these are two different problems: crawling/indexing of parameterized URLs, and whether commented-out text in the page source gets picked up. was right that parameter URLs get crawled, and was right that rewriting can be used to present cleaner addresses.

Practical steps to avoid problems and duplicate content:

  • Prefer a single canonical URL for each logical page. Use a rel="canonical" link or server-side 301 redirects to consolidate parameter variants. See Google’s guidance on consolidating duplicate URLs: Consolidate duplicate URLs.
  • Tell Google how to treat parameters if they change page content or only modify tracking/ordering. Use the Search Console parameter tool / parameter settings to reduce unnecessary crawling: .
  • Avoid putting session identifiers in URLs. They create many distinct addresses and waste crawl budget; use cookies or server-side sessions instead.

About commented HTML:

  • Content inside <!-- comments --> is not part of the visible DOM and should not be relied on for indexing. If content must be indexed, surface it in the rendered page (or let it be added dynamically and test rendering).
  • Verify what Googlebot actually sees by using Search Console’s URL Inspection and render tools: and the JavaScript rendering notes: JavaScript SEO basics.

Quick checklist: set canonical URLs, configure parameter handling, remove session IDs from URLs, use URL rewriting only to present the canonical address, and test pages with the URL Inspection tool.

Recommended Answers

All 2 Replies

As far as I know, Google does not properly index sites with an Id appended to a URL.

The technique you are seeing is using Mod Rewrite

Google indexes query strings just fine. This includes anything with id= in the query string. The only thing you should avoid as of now are sessionIDs.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.