# Delete Dynamically Created page from HubDB

**URL:** <https://community.hubspot.com/t/delete-dynamically-created-page-from-hubdb/126081>\
**Category:** CMS Development\
**Tags:** hubdb\
**Created:** [February 13, 2025, 9:09pm UTC](https://community.hubspot.com/t/delete-dynamically-created-page-from-hubdb/126081 "2025-02-13T21:09:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![likwid](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/likwid/32/58551_2.png) [@likwid](https://community.hubspot.com/u/likwid)\
**Post date:** [February 13, 2025, 9:09pm UTC](https://community.hubspot.com/t/delete-dynamically-created-page-from-hubdb/126081/1 "2025-02-13T21:09:04Z")

</div>

I accidentally published a page that had the wrong HubDB selected as the data source. When I connect the right table and publish the page all of the dynamic pages that were created from the wrong table become 404 but show up in Hubspot reporting and Google Console. Is there a way to create dynamically created pages?

---

<div class="post-metadata">

**Author:** ![jnix284](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jnix284/32/29_2.png) [@jnix284](https://community.hubspot.com/u/jnix284)\
**Post date:** [February 14, 2025, 1:16am UTC](https://community.hubspot.com/t/delete-dynamically-created-page-from-hubdb/126081/2 "2025-02-14T01:16:05Z")

</div>

@likwid I think the only real option would be to create URL redirects to remove them from your Google Console, but I’m not sure there’s a way to exclude them from your HubSpot reporting - I’d need to know more about how the dynamic URLs were generated and if you used the same page when you connected the new data source or if you created a clone/new version first.

---

<div class="post-metadata">

**Author:** ![likwid](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/likwid/32/58551_2.png) [@likwid](https://community.hubspot.com/u/likwid)\
**Post date:** [February 14, 2025, 3:19am UTC](https://community.hubspot.com/t/delete-dynamically-created-page-from-hubdb/126081/3 "2025-02-14T03:19:39Z")

</div>

Hello Jinx284,

Thanks for the reply. The dynamic pages were created by setting up a HubDB and filling in the hs\_path column with a page path example-page-path.

 ![likwid_0-1739502662397.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/3/d38ed776cd3eb0af2e64fcdd91eec762b7d6da0a.png)

The creating a component with this line of Hubl {% if dynamic\_page\_hubdb\_row %} and setting up a page with the data source

 ![likwid_1-1739502892891.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/3/33a4917c89190be6e103ccae0e600701b64a0081.png)

Then publish the page and go to domain/example-page-path. I published the page the first time with the wrong data source and switch the data source and published the same page. The original pages from the wrong data source are still out there causing problems. I read that if you reattached the wrong data source again and unpublish the page it will remove the dynamic page. The reconnect the right source and publish again. That doesn’t seem to be working. Thanks for your help on this.

---

<div class="post-metadata">

**Author:** ![jnix284](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jnix284/32/29_2.png) [@jnix284](https://community.hubspot.com/u/jnix284)\
**Post date:** [February 14, 2025, 4:34pm UTC](https://community.hubspot.com/t/delete-dynamically-created-page-from-hubdb/126081/4 "2025-02-14T16:34:23Z")

</div>

@likwid sorry for the delayed response, glad that @SanjayKumar was able to get you the steps to follow 🙌

---

<div class="post-metadata">

**Author:** ![likwid](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/likwid/32/58551_2.png) [@likwid](https://community.hubspot.com/u/likwid)\
**Post date:** [February 14, 2025, 4:54pm UTC](https://community.hubspot.com/t/delete-dynamically-created-page-from-hubdb/126081/5 "2025-02-14T16:54:33Z")

</div>

@Jnix284 No problem. Thanks for the input.

---

<div class="post-metadata">

**Author:** ![SanjayKumar](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sanjaykumar/32/16943_2.png) [@SanjayKumar](https://community.hubspot.com/u/SanjayKumar)\
**Post date:** [February 14, 2025, 12:50pm UTC](https://community.hubspot.com/t/delete-dynamically-created-page-from-hubdb/126081/6 "2025-02-14T12:50:47Z")

</div>

Hi @likwid,  
Here are some steps to ensure the old dynamic pages are removed:

1. Reconnect the HubDB Table  
- Go to the Page Editor where the dynamic pages are set up.  
- Change the Data Source back to the HubDB table.  
- Publish the page again to ensure HubSpot recognizes the connection.
2. You also have to change the table id set in your module or template e.g.  
{% for row in hubdb\_table\_rows(right\_table\_id) %}  
\<li\>\<a href=“{{ request.path }}/{{ row.hs\_path }}”\>{{ row.hs\_name }}\</a\>\</li\>  
{% endfor %}

---

<div class="post-metadata">

**Author:** ![likwid](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/likwid/32/58551_2.png) [@likwid](https://community.hubspot.com/u/likwid)\
**Post date:** [February 14, 2025, 12:57pm UTC](https://community.hubspot.com/t/delete-dynamically-created-page-from-hubdb/126081/7 "2025-02-14T12:57:54Z")

</div>

@SanjayKumar Thank you for what I am going to call the solution. I will try that out.

Thanks again.
