DEV Community

Sa
Sa

Posted on • Edited on

Ecwid - good for everyone, if not for one "BUT"

Ecwid is quite interesting solution for creating an online store, if there is no desire to dig into the code, databases and other programming subtleties.
It is enough to create your own store in the ecwid admin panel, and then just insert a piece of code on the site - without correcting anything, without changing, but simply "CTRL+C" - "CTRL+V":

<script data-cfasync="false" type="text/javascript" src="https://app.ecwid.com/script.js?XXXXXXXX&data_platform=code&lang=YY&data_date=ZZ-ZZ-ZZ" charset="utf-8"></script>
Enter fullscreen mode Exit fullscreen mode

And then a whole store is already available on a certain page of the site:

And it seems that everything is fine - the job is done. But this may be true only if the goal is not to make this store indexed by Google!
Pay attention to the internal links in this store:

See the "#!" in the link? This means that ALL THE PAGES OF the STORE WILL BE LOADED using AJAX. But Google has firmly and unequivocally made it clear that it will not index pages generated by this method: https://developers.google.com/search/docs/crawling-indexing/javascript/fix-search-javascript

And now our joy has almost come to an end.
What to do in such a situation?

There is, of course, a way out, but it is very long and not very simple. And, perhaps, it would be easier to initially create an online store on another platform. But since the store has already been created and there was no desire to transfer all the data, the task was set to solve this issue with the already existing situation.

Let's take a look, first of all, at the list of categories of this store:

Image description

You can see that absolutely every category is also loaded by ajax. And what if we can replace "#!" with some secret word, and the result will show the same - dynamic? That is, in this case there will be like https://athos.guide/products/monastic-handicrafts

That's not bad, because it's just a URL that Google can index! Of course, then we need to do the same with the products in each category. It was:

And now:

Image description

A completely readable URL that Google likes!
Now let's observe how well these links will be indexed - because now nothing restricts their indexing...

Top comments (0)