CMS Development

KMG2
Participant

Hubspot pages with hsLang slug getting redirected to respective pages without the hsLang slug

SOLVE

I am new to Hubspot and I am working on an already build Hubspot project. I came across an issue of redirection and I couldn't figureout the reason for this. The redirection happends like this:

Original URL:
https://abcd.com/xyz?sLang=en  
Redirected URL: 
 https://abcd.com/xyz

Anyone please help find the actual cause of this issue as this a major undesired redirection in the website.

0 Upvotes
2 Accepted solutions
assi
Solution
Guide

Hubspot pages with hsLang slug getting redirected to respective pages without the hsLang slug

SOLVE

Hi @KMG2 
This redirect is caused by the setting here: 

ADA95AB4-6641-469A-B295-6E41C00A2984.jpeg



Try to toggle!

View solution in original post

KMG2
Solution
Participant

Hubspot pages with hsLang slug getting redirected to respective pages without the hsLang slug

SOLVE

Yes @assi , we have all these 3 points set in our project which might be causing this undesired redirection and as we are not sure how HB handles this, we cannot arive at a conclusion on the issue why this redirection is happening only for certain pages in HB, not throughout the website pages. Thanks for your support.

View solution in original post

4 Replies 4
KMG2
Participant

Hubspot pages with hsLang slug getting redirected to respective pages without the hsLang slug

SOLVE

Thanks @assi for the reply. We have this particular setting enabled in our project. But when I checked it, I saw that this redirection is happening only to fewer URLs not all URLs. If this setting will affect the whole website, then why this redirection is only happening for some URLs , not for all URLs?

assi
Guide

Hubspot pages with hsLang slug getting redirected to respective pages without the hsLang slug

SOLVE

@KMG2 

Well, following is including my prediction. this ?hsLang=XX redirect is triggered by 3 conditions: 

  1. wheather "Enable Language Specific Redirects" is on or not
  2. wheather language is set to domain(they're shown on the screenshot I uploaded)
  3. wheather visitor's primary language is detected
    1. this is includes in request-header

capture.png

 

All of these conditions are cleared, it's considered ?hsLang=XX query parameters are added to each href attribute. But to be honset, I'm not sure how HubSpot finally controls it.

0 Upvotes
KMG2
Solution
Participant

Hubspot pages with hsLang slug getting redirected to respective pages without the hsLang slug

SOLVE

Yes @assi , we have all these 3 points set in our project which might be causing this undesired redirection and as we are not sure how HB handles this, we cannot arive at a conclusion on the issue why this redirection is happening only for certain pages in HB, not throughout the website pages. Thanks for your support.

assi
Solution
Guide

Hubspot pages with hsLang slug getting redirected to respective pages without the hsLang slug

SOLVE

Hi @KMG2 
This redirect is caused by the setting here: 

ADA95AB4-6641-469A-B295-6E41C00A2984.jpeg



Try to toggle!