I have 10 parent URLs (ex: .../brazing-collection/...), each of which has a group of child pages dynamically rendered with a dynamic template from data in a HubDB table. The website pages work as expected but...
Looking at my sitemap.xml file: each of my dynamic child URLs is present for the correct parent URL, but also for each of the 9 other parent URLs. This is weird and it's also messing with my indexed pages listing on GSC, since some of these false URLs are being referred to the Google index by the sitemap.xml file.
This is a pretty common (and frustrating) issue when working with HubSpot’s dynamic pages, especially if you’re using HubDB to generate them. Don’t worry — I’ll walk you through why this is happening and what you can do to fix it.
Why This Is Happening:
One template, many parent paths (collections)
You’re using one dynamic page template that pulls content from a HubDB table. Ideally, each item in the table (like a specific brazing application) should only appear under one collection (like /brazing-collection/).
But HubSpot doesn’t automatically enforce that. So, if your setup isn’t carefully structured, the same page (like brazing-steel-collar-and-inductor) ends up being accessible under other collections too (like /soldering-collection/), even though that doesn’t make sense.
Flexible URL routing = accidental duplicates
HubSpot’s dynamic page system is flexible. That’s great, but it also means that unless you’ve set up very specific logic, each item in your HubDB table might be available under any of your parent collection URLs.
HubSpot’s sitemap includes anything “reachable”
If a URL works — even if it’s not correct — HubSpot adds it to your sitemap. That’s why all those incorrect URLs are showing up in your sitemap.xml and getting indexed by Google.
What You Can Do About It:
You need to make sure each dynamic page:
Has only one valid, correct URL, and
Isn’t accidentally accessible under the wrong parent paths.
Here’s how to fix that:
Set Up Canonical URLs (most important for SEO)
Tell search engines which version of each page is the official one.
In your HubDB table, add a column called something like canonical_url, and fill it with the correct full URL for each row (e.g., /brazing-collection/brazing-steel-collar-and-inductor).
Then, in your dynamic page settings, make sure HubSpot uses that column as the Canonical URL field.
This adds a <link rel="canonical" href="..."> tag to each page’s <head>, helping Google know which URL to trust and ignore the duplicates.
Fix Your Dynamic Page Routing (very important)
You need to make sure that each item in your HubDB table is only accessible through its proper collection route.
You likely have one of two setups:
One dynamic page handles all collections (recommended)
If all your collection types (brazing, soldering, etc.) are in one HubDB table:
Add a collection-type column in your HubDB table (e.g., brazing-collection)
Use logic in your template like this:
{% set path_parts = request.path|split('/') %}
{% set collection = path_parts[3] %}
{% for row in hubdb_table_rows(123456) %}
{% if row.collection_type == collection %}
{# Render this row's content only if the collection matches #}
{% endif %}
{% endfor %}
This ensures a brazing page won’t render under soldering URLs.
You have multiple dynamic pages for different collections using the same HubDB
This creates duplicates — don’t do this unless each collection pulls from a separate HubDB table. If they all use the same table, stick to a single dynamic page with filtering logic as shown above.
Optional: Use Robots.txt to Block Bad URLs
This is a backup option, not a real fix.
You can block the bad URLs from being crawled by search engines via robots.txt, but this doesn’t stop them from being indexed if Google finds them elsewhere.
Temporarily Remove the Bad URLs from Google
If wrong URLs are already in Google’s index, go to Google Search Console > Removals and request to temporarily remove them.
This clears them out faster, but won’t stop them from coming back unless you fix the routing and canonical issues above.
Checklist:
Make routing and canonical updates as above.
Test everything: Make sure incorrect URLs return a 404 or don’t show content.
This is a pretty common (and frustrating) issue when working with HubSpot’s dynamic pages, especially if you’re using HubDB to generate them. Don’t worry — I’ll walk you through why this is happening and what you can do to fix it.
Why This Is Happening:
One template, many parent paths (collections)
You’re using one dynamic page template that pulls content from a HubDB table. Ideally, each item in the table (like a specific brazing application) should only appear under one collection (like /brazing-collection/).
But HubSpot doesn’t automatically enforce that. So, if your setup isn’t carefully structured, the same page (like brazing-steel-collar-and-inductor) ends up being accessible under other collections too (like /soldering-collection/), even though that doesn’t make sense.
Flexible URL routing = accidental duplicates
HubSpot’s dynamic page system is flexible. That’s great, but it also means that unless you’ve set up very specific logic, each item in your HubDB table might be available under any of your parent collection URLs.
HubSpot’s sitemap includes anything “reachable”
If a URL works — even if it’s not correct — HubSpot adds it to your sitemap. That’s why all those incorrect URLs are showing up in your sitemap.xml and getting indexed by Google.
What You Can Do About It:
You need to make sure each dynamic page:
Has only one valid, correct URL, and
Isn’t accidentally accessible under the wrong parent paths.
Here’s how to fix that:
Set Up Canonical URLs (most important for SEO)
Tell search engines which version of each page is the official one.
In your HubDB table, add a column called something like canonical_url, and fill it with the correct full URL for each row (e.g., /brazing-collection/brazing-steel-collar-and-inductor).
Then, in your dynamic page settings, make sure HubSpot uses that column as the Canonical URL field.
This adds a <link rel="canonical" href="..."> tag to each page’s <head>, helping Google know which URL to trust and ignore the duplicates.
Fix Your Dynamic Page Routing (very important)
You need to make sure that each item in your HubDB table is only accessible through its proper collection route.
You likely have one of two setups:
One dynamic page handles all collections (recommended)
If all your collection types (brazing, soldering, etc.) are in one HubDB table:
Add a collection-type column in your HubDB table (e.g., brazing-collection)
Use logic in your template like this:
{% set path_parts = request.path|split('/') %}
{% set collection = path_parts[3] %}
{% for row in hubdb_table_rows(123456) %}
{% if row.collection_type == collection %}
{# Render this row's content only if the collection matches #}
{% endif %}
{% endfor %}
This ensures a brazing page won’t render under soldering URLs.
You have multiple dynamic pages for different collections using the same HubDB
This creates duplicates — don’t do this unless each collection pulls from a separate HubDB table. If they all use the same table, stick to a single dynamic page with filtering logic as shown above.
Optional: Use Robots.txt to Block Bad URLs
This is a backup option, not a real fix.
You can block the bad URLs from being crawled by search engines via robots.txt, but this doesn’t stop them from being indexed if Google finds them elsewhere.
Temporarily Remove the Bad URLs from Google
If wrong URLs are already in Google’s index, go to Google Search Console > Removals and request to temporarily remove them.
This clears them out faster, but won’t stop them from coming back unless you fix the routing and canonical issues above.
Checklist:
Make routing and canonical updates as above.
Test everything: Make sure incorrect URLs return a 404 or don’t show content.