Can replacing URL with pushState to a cleaner URL that redirects be bad for SEO?

New Member
1 0 0

We have a Shopify store. It has URL structure for blogs like mysite.myshopify.example/blogs/blogname/article-name To overcome Shopify rigid URL structure and make links more human-readable and memorable we'd like to use the following technique: Create redirect from non-existent (404) URL mysite.myshopify.example/blogname/article-name to an existing page mysite.myshopify.example/blogs/blogname/article-name On the existing page change URL in the address bar with the following Javascript: let pretty_url_for_blog = window.location.href.replace('/blogs', ''); Site window.history.pushState({path:pretty_url_for_blog},'',pretty_url_for_blog); – making site visitors see shorter URL mysite.myshopify.example/blogname/article-name Is there any reason to think Google could penalize us for this? Which could be the arguments why it's good or bad for SEO? Any thoughts are welcome.

Replies 0 (0)