Where did you get the information that this is not good practice? There is no problem in doing this. All sites do, the search engine accesses the page as if it were a browser.
How page generation works
I just don’t say "if the browser sees the content the search engine will also see" because this is not an absolute truth when the content is mounted through Javascript.
There is the myth that today this is solved, but it is not true. The situation that was zero ability of the mechanisms understand JS, improved, but still has ground. And yet it has its own techniques to achieve a reasonable result in some mechanisms, not all. Although only Google actually counts.
Any page generated on-the-fly on the server will be seen normally without any problem. The only reason to generate static pages would be to optimize the server capacity since you would generate a page once and then only make accesses. But I’ve seen people abuse this and get the opposite result.
When the page is dynamic it is generated every time it is requested, unless cache is used. And obviously the general page cache only works if the page never changes, or at least changes little, which is not so common. Often each page requested have a difference to the previous, by advertising, novelties, personalization or other reason. Dynamic pages generate more load on the server, but in most cases this is no problem, and the various levels of cache will help mitigate a very intense load.
Browser cache is also your friend.
The problem is on these pages SPA. In this case the generation is done in the browser, by JS. The search engine may simulate some executions and generate content, but there are several situations that this is impractical.
Extension of page name
When you generate a page you can put the extension you want. It is not required to be .aspx
, or .php
or another extension for it to be processed.
If you set up the HTTP server for an extension to be processed, every time something with this configured extension is called will trigger a designated processor, which can be an application or interpreter of a language. You can configure to the .html
be processed as an ASP.NET application if you like. It has been agreed that the extension .html
is used for static pages, but nothing prevents it from being this.
URL friendly
In addition it is possible to use a URL friendly (another question) which transforms the URL into a route that internally calls on the server some specific application or piece of it. That is, you disguise the actual address of the application for something that makes it easier for people to read, and search engines to identify the content. This is a very common technique that can be configured on the HTTP server (Apache, IIS, etc.) or within the application. Particularly prefer within the application.
Completion
Don’t worry about generating dynamic pages. And when this is creating load problems, start to see techniques to reduce the problem, but not before.
This is general information. When you have more specific questions open more specific questions.
What technology are you using on your website?
– Maniero
@bigown am using MVC Asp.net (C#)
– Gleison França
Take a look at the tour. You can accept an answer if it solved your problem. You can vote on every post on the site as well. Did any help you more? You need something to be improved?
– Maniero