I need to change the “go to home” button link on hubspot’s default 404 page. Does anyone know how I can change it?
Hi @ILeiteCosta,
the 404 page is only editable through the Design-Tools(or Design-Manager).
To change it click on “Action” below the 404 in the settings and select “edit”. It will take you to the template. In most cases you’ll need to clone this template since it’s a default one.
To know what’s the right template afterwards change this
<!--
templateType: error_page
isAvailableForNewContent: true
-->
to
<!--
templateType: error_page
isAvailableForNewContent: true
label: Custom 404 page
-->
Change the label to your needs
After you’ve renamed it locate this code part:
{% module "return_button"
path="@hubspot/button",
extra_classes="button-wrapper",
button_text={{ template_translations.error_404_button.message }},
link={
"url": {
"type": "EXTERNAL",
"href": "/"
}
}
%}
and modify it like this
{% module "return_button"
path="@hubspot/button",
extra_classes="button-wrapper",
button_text={{ template_translations.error_404_button.message }},
link={
"url": {
"type": "EXTERNAL",
"href": "my-custom-URL"
}
}
%}
Once you’ve completed this, click on Update in the top right corner, go to your settings where you set the system pages, select the newly created template and you’re good to go
best,
Anton
Hi Anton, thank you for your instructions. I followed these, as I’m having the same issue. However, I cannot update it as it is returning the following errors messages in the error console:
1. Error:0:-1This template is missing the required tag {{ standard_header_includes }}
2. Error:0:-1Template doesn’t include the tag standard_footer_includes. Needed for HubSpot analytics
3. Error:This template is missing the required tag {{ standard_header_includes }}
4. Error:Template doesn’t include the tag standard_footer_includes. Needed for HubSpot analytics
5. Warning:12:-1Missing template /base.html
Do you have any recommendations on how to fix this? Any help would be appreciated. Thank you.
Lee