Internal searches using AJAX affects SEO?
I have read in some sites that is a good practice for SEO to use URLs like www.example.com/params-for-your-search as words separated by hyphens.
I'm creating a SPA ReactJS Application where I have a list of elements that can be filtered or searched by tags. So, when the user selects a tag, the application does an AJAX request and get the filtered elements.
But as I'm using AJAX (Axios library), the URL does not change, it is always something like www.example.com, no matter what filter you are applying.
What is the best coding SEO practice when you are programming "internal" searches?
It is better to change my URL, setting the selected tags separated by hyphens? What would be the best way to do it in react?
Google will only ever reward for content that appears on page load. It's not a user, it won't fill in forms, it won't click checkboxes and so on, therefore, you need to make the search results accessible by a URL.
Google used to use AJAX _escaped_fragment_ but now it uses #!.
Examples:
www.example.com/#!/search-term/www.example.com/#!search-term.
Then you need to ensure that Google can see these URLS, this can be done in the sitemap but ideally, include them in easy to read JavaScript. Then you test those URLS using the Google Fetch and Render, ensuring that Google can see the extra content.
Comments
Post a Comment