TLDR: Now that your Styla content is rendered on your page(s), requests are routed to the accordingly and Styla has integrated with product data from your shop application, you can make static no-JS content available to search engines. In order to do this, you will need to make a request to Styla's SEO API for each page to get this content as JSON and render it as HTML tags in HTML of the page on which your Styla content is displayed.
1. For each request for a URL within your Content Hub (any URL within your main route, ie: http://example.com/rootpath/*), call a corresponding endpoint on Styla's SEO API:
2. The SEO API endpoints will deliver a JSON with about 25 nodes for SEO-related content of your Styla page, examples:
For each node in the "tags" the "tag" field defines an HTML tag name while the "attributes" array lists the tag's attributes, while "content" is what you put inside the tag example:
{
"tag": "link",
"attributes": {
"rel": "canonical",
"href": "https://www.braun-hamburg.com/de/stories/story/architektur-trifft-auf-natur"
},
"content": ""
},
should be rendered in HTML as:
<link rel="canonical" href="https://www.braun-hamburg.com/de/stories/story/architektur-trifft-auf-natur"></link>
3. Render the tags that you need (ideally, all of them) in the HTML of the page your Styla content is embedded into. Avoid having duplicated tags (e.g. double <title> tags). Styla's tags should substitute the ones you normally generate only for this specific page.
4. Remember, that you can modify the tags content freely before rendering them in site HTML, if you need this.
You're only adding the content from Styla SEO API for crawlers to see it. People don't see tags in HTML content and after the first request from a human's browser, there will be no more requests to your website as the content in the browser will be rendered by JS and fetched from a Styla server. Only search engine crawlers will request further Magazine URLs they will see referenced in the static HTML rendered from SEO API endpoints. This is what it's so important to let them find all pages in Magazine feed HTML and crawl them to see its whole structure (and then use it show in search results as part of your website).
If you use a PHP application we don't have a plugin for, then please have a look at this repository: Styla PHP SDK. You can develop your own integration with the SEO API based on that, with little effort.
Styla automatically generates an .xml file with links to all Pages and Magazine Stories you create. You can reference it in your robots.txt file to direct crawlers to pages with Styla content.
This Styla sitemap file is always available at: https://sitemaps.styla.com/{account-name}/sitemap.xml.
For Magazine Stories, a feed in RSS format is created too. It's available at: http://live.styla.com/api/rss/user/{account-name}
Styla plugins do not automatically include Styla content in your website's search results. But there is an easy way to make this work.
If you are interested in this feature, please contact your Styla Custom Success Manager. You will get an access to an .xml file that is periodically updated to list all published Styla pages and an endpoint on which you can crawl specific content fields for a page to include them in your search results.
Read more about this on this page.
Once you have the above integration running on your local, stage and production environment, please make sure everything is working fine:
Problems with the above steps can be caused by the following factors:
If there are any problems that you cannot solve, please contact Styla support.