Skip to main content
Tweeted twitter.com/StackWebmasters/status/903058128513720321

I'm building a single page application and i'mI'm using a client-side routing library to handle urlURL/state changes.

Let's say googlebotGooglebot visits example.com/my-shop-name/menuexample.com/my-shop-name/menu, the menu-itemsmenu-items for my-shop-namemy-shop-name are loaded dynamically and a urlURL parameter is immediately appended to the urlURL like so: example.com/my-shop-name/menu?top_item=some_item_idexample.com/my-shop-name/menu?top_item=some_item_id. top_itemtop_item represents the item in a list of menu-itemsmenu-items on the page that is currently at the top of the viewport. As the user scrolls, this parameter will naturally update as the top-most item changes. The point of this parameter is to remember the scroll position. It should also be pointed out that whenever the parameter is updated in the urlURL, the page never reloads.

My first question is: what urlURL will be indexed?

  • example.com/my-shop-name/menu

example.com/my-shop-name/menu or

example.com/my-shop-name/menu?top_item=some_item_id

  • example.com/my-shop-name/menu?top_item=some_item_id

Secondly, if the latter is indexed, will instructing the web crawlers to ignore top_itemtop_item as a urlURL parameter in robots.txtrobots.txt make it so the first urlURL is indexed and the latter is not?

I'm building a single page application and i'm using a client-side routing library to handle url/state changes.

Let's say googlebot visits example.com/my-shop-name/menu, the menu-items for my-shop-name are loaded dynamically and a url parameter is immediately appended to the url like so: example.com/my-shop-name/menu?top_item=some_item_id. top_item represents the item in a list of menu-items on the page that is currently at the top of the viewport. As the user scrolls, this parameter will naturally update as the top-most item changes. The point of this parameter is to remember the scroll position. It should also be pointed out that whenever the parameter is updated in the url, the page never reloads.

My first question is: what url will be indexed?

example.com/my-shop-name/menu or

example.com/my-shop-name/menu?top_item=some_item_id

Secondly, if the latter is indexed, will instructing the web crawlers to ignore top_item as a url parameter in robots.txt make it so the first url is indexed and the latter is not?

I'm building a single page application and I'm using a client-side routing library to handle URL/state changes.

Let's say Googlebot visits example.com/my-shop-name/menu, the menu-items for my-shop-name are loaded dynamically and a URL parameter is immediately appended to the URL like so: example.com/my-shop-name/menu?top_item=some_item_id. top_item represents the item in a list of menu-items on the page that is currently at the top of the viewport. As the user scrolls, this parameter will naturally update as the top-most item changes. The point of this parameter is to remember the scroll position. It should also be pointed out that whenever the parameter is updated in the URL, the page never reloads.

My first question is: what URL will be indexed?

  • example.com/my-shop-name/menu

or

  • example.com/my-shop-name/menu?top_item=some_item_id

Secondly, if the latter is indexed, will instructing the web crawlers to ignore top_item as a URL parameter in robots.txt make it so the first URL is indexed and the latter is not?

Source Link
Vincent
  • 131
  • 2

URL param additions on page load w/o page reload SEO design

I'm building a single page application and i'm using a client-side routing library to handle url/state changes.

Let's say googlebot visits example.com/my-shop-name/menu, the menu-items for my-shop-name are loaded dynamically and a url parameter is immediately appended to the url like so: example.com/my-shop-name/menu?top_item=some_item_id. top_item represents the item in a list of menu-items on the page that is currently at the top of the viewport. As the user scrolls, this parameter will naturally update as the top-most item changes. The point of this parameter is to remember the scroll position. It should also be pointed out that whenever the parameter is updated in the url, the page never reloads.

My first question is: what url will be indexed?

example.com/my-shop-name/menu or

example.com/my-shop-name/menu?top_item=some_item_id

Secondly, if the latter is indexed, will instructing the web crawlers to ignore top_item as a url parameter in robots.txt make it so the first url is indexed and the latter is not?