CMS Development

KimM
Top Contributor

Using URL Queries on Canonical URL's

Hi All,

 

I'm having some trouble with using URL Queries on Canonical URL's and can't seem to find any guidance online for this.

 

I've got a couple of use cases to help explain the issue I'm having, but essentially the main issue is the canonical URL location is not pulling the request.query variable on the page.

 

Example 1:

I've created a filter form on this page to display content based on the team and topic it relates to. It populates the URL query onformsubmit and then the page will display the matching HubDB table rows that match that query. It all works perfectly fine on the subdomain, however when I set up the canonical URL the request.query variable doesn't populate at all.

 

Here is the working version on the subdomain and here is the canonical URL I am trying to get to work.

 

Example 2:

I've set up an enquiry form that will prefill some form fields and change the copy at the top depending on the URL queries (which are set depending on which profile the user comes from). So if they have the supplier name and product set in the URL query, then the form will set the H1 and subtext to specifically reference who they are enquiring with.

 

Here is the working version on the subdomain and here is the canonical URL with the same example parameters.

 

We set all of our web pages to canonical URL's so would be really helpful to be able to use URL queries if anyone has any idea on a fix for this?

 

Thanks in advance!

0 Upvotes
1 Reply 1
Chriso-mwx
Key Advisor | Platinum Partner
Key Advisor | Platinum Partner

Using URL Queries on Canonical URL's

Hey @KimM ,

 

first of all: How did you manage to publish your pages to the root domain? As far as I'm aware of, Hubspot only allows us to publish to a subdomain (e.g. www. with CMS Hub or content. Like in your case) and to redirect from that root domain to the respective subdomain 🤔 

 

Don't know if this is related to your problem but it's something that immediately caught my eye and I first want to check. 

Cheers,

Chriso

0 Upvotes