1

I'm working on a website that dynamically replaces URLs during state changes so that if a user copy/pastes the URL at any give time, they will be able to land on a page that reflects the state when the URL was copied (I think that was the best way to express that idea...it seems wordy!).

For example, if a user visits the endpoint www.site.com/dashboard, the page defaults to the first tab (say, www.site.com/dashboard?tab=something_public). The URL is replaced client-side. Note that both URLs resolve to the same content.

Now, both of these pages appear after an appropriate Google search.

I'm curious how this scenario will affect the page ranking of www.site.com. If I could somehow merge these into one page, would this improve my site's ranking? That is, would the ranking of www.site.com improve overall?

0

Using your example, www.example.com/dashboard versus www.example.com/dashboard?tab=something_public versus www.example.com/dashboard?tab=something_else_public, regardless of the resulting HTML, Google will see these as separate pages. The reason for this is simple. The URL is one of two major keys within the index. As long as each URL is unique, it is a unique page regardless of what your website does.

To correct the record, you need to use a canonical tag within the HTML head tag to indicate which page is the original.

Still using your example, www.example.com/dashboard?tab=something_public would have a canonical tag pointing to www.example.com/dashboard. In fact, if it makes it easier, www.example.com/dashboard can have a canonical tag pointing to itself.

Here is Google's page in this:

https://support.google.com/webmasters/answer/139066?hl=en

Look for the header: Indicate the preferred URL with the rel="canonical" link element

Here is the sample code on that page:

<link rel="canonical" href="https://blog.example.com/dresses/green-dresses-are-awesome" />

The advice is to use absolute URLs and not relative URLs for canonical tags.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.