Your premise is completely and utterly false. It is absolutely not the case that Google can't index dynamically created websites. Of course it can: StackOverflow, which has awesome SEO, is just one of the millions of dynamic websites indexed by Google.
create static html pages dynamically cos of SEO
-
14-04-2022 - |
Question
I am trying how to create static html pages dynamically. It is because I am reading that dynamic content is not google friendly, google cannot crawle the content which is coming from database once the page is opened.
in exact example:
{{ content_from_db }}
this variable is replaced with long text. This long text contains many important keywords of the page. I read that this content is unfortunately not seen by google since it is dynamic.
Then I said, well lets create static html pages dynamically, but i am stuck here not knowing how..
is it possible?
Solution
OTHER TIPS
yes its possible i will give u short example you can proceed with it. we had a similar requirement so what we did was
def GenerateDynamicSelectPopulate(model, modelFields):
models=Product
modelsField=productname
str="""$.ajax({
type: 'GET',
async: false,
url: 'http://127.0.0.1:8000/api/v1/%s/?format=json',
cache: false,
accepts: 'application/json',
success: function(data){
var options = ''
for(i = 0; i < data.objects.length; ++i) {
var str = '<option value="' + data.objects[i].id + '">'+ %s + '</option>'
options=options+str
}
$('#%s').html(options)
},
dataType: "json"
});"""
here replace all '%s' in above code from the value you want similarly for html page u make a string having html code and things that can change make them as %s and provide value at runtime thus you can make html page at runtime
good luck