How to use different 404 pages for secondary domains in hubspot
I was able to find a solution that might help your problem. If you create a custom module for the content of the 404 page you set up in your system, you can parse the path to determine where the user was trying to navigate and alter the content of the 404 page based on that information.
For example, if you're trying to display a specific 404 page when users are following a path that includes "/products", you could use the following code to pick up that specific scenario to display unique HTML acordingly:
{% set path = request.path %} {% set params = path|split("/") %}
From there you will need to go to Settings > Marketing > Web pages > System pages to assign your 404 pages to your specific domains (be sure to clickAll domains at the top of the interface to select the correct domain).
Thank you,
Ed Justen
Did my post help answer your query? Help the Community by marking it as a solution
How to use different 404 pages for secondary domains in hubspot
Right i did that , but it is redirecting to primary domain.
When i go to manage domain and click on specific domains ( edit ) , i saw an option for redirectoin but i dont want it to redirect to primary domain. I simple want to redirect no exits page to 404 page
How to use different 404 pages for secondary domains in hubspot
Hi @mayankk If I am understanding you correctly, this is not possible. You won't be able to use the Domain Manager to redirect to a domain 404 page. You can redirect to a specific domain, and 404 will show if a page has yet to be set to live at the root of that subdomain.
If this isn't your goal, please provide a bit more context (more screenshots and your HUB ID would be helpful also) and I'll do my best to advise you further.
Thank you,
Ed Justen
Did my post help answer your query? Help the Community by marking it as a solution