Design and SEO for a single page dynamic website with AJAX

0 votes
I designed a website in which the whole site is contained within one page (index.php). Within the page, <section> tags define different parts of the site (home, contact, blog, etc.)
Navigation is achieved by buttons that are always visible, and when clicked use javascript to change the visibility of the sections, so that only one is shown at any time.
More specifically, this is done by using the hash in the URL and handling the hashchange event. This results in URLs such as www.site.com/#home (the default if no other hash is present) and www.site.com/#contact.
I want to know if this is a good design. It works, but I get the feeling there must be a better way to achieve the same thing? To clarify, I was aiming for the site that loaded all the main content once, so that there were no more page loads after the initial load, and moving between sections would be smoother.
On top of this, another problem is introduced concerning SEO. The site shows up in google, but if for example, a search query contains a term in a specific section, it still loads the default #home page when clicked, not the specific section the term was found in. How can I rectify this?
Finally, one of the sections is a blog section, which is the only section that does not load all at once, since by default it loads the latest post from a database. When a user selects a different post from a list (which in itself is loaded using AJAX), AJAX is used to fetch and display the new post, and pushState changes the history. Again, to give each post a unique URL that can be referenced externally, the menu changes the URL which is handled by javascript, resulting in URLs such as www.site.com/?blogPost=2#blog and www.site.com/?blogPost=1#blog.
These posts aren't seen by google at all. Using the Googlebot tool shows that the crawler sees the blog section as always empty, so none of the blog posts are indexed.
What can I change?
Mar 12, 2022 in Digital Marketing by Kichu
• 19,040 points
549 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Digital Marketing

0 votes
1 answer

"Single-page" JS websites and SEO

If you're using Rails, try poirot. It's ...READ MORE

answered Mar 4, 2022 in Digital Marketing by narikkadan
• 63,600 points
687 views
0 votes
0 answers

SEO with single page application

I built a node.js social networking web ...READ MORE

Mar 4, 2022 in Digital Marketing by Kichu
• 19,040 points
519 views
0 votes
1 answer

Where can I obtain a list of User Agents for SEO bots?

add crawler user agents and that would ...READ MORE

answered Mar 1, 2022 in Digital Marketing by narikkadan
• 63,600 points
1,258 views
0 votes
0 answers

Perfect SEO for simple website?

I have a simple website with 1 ...READ MORE

Mar 2, 2022 in Digital Marketing by Kichu
• 19,040 points
390 views
0 votes
0 answers

meta tags that are vital for a website

Mar 3, 2022 in Digital Marketing by Kichu
• 19,040 points
357 views
0 votes
0 answers

Adding the CANONICAL tag to my page for SEO through code behind?

I am using ASP.NET with MasterPages. Thus ...READ MORE

Mar 3, 2022 in Digital Marketing by Kichu
• 19,040 points
1,353 views
0 votes
1 answer

What are XMLHttpRequest Object in Ajax?

 As, you are up to ajax so ...READ MORE

answered Jan 31, 2020 in Java-Script by Niroj
• 82,840 points
1,427 views
0 votes
0 answers

Angular and SEO indexing

app.config(["$routeProvider", function($routeProvider) { $routeProvider .when("/", ...READ MORE

Feb 14, 2022 in Others by Kichu
• 19,040 points
312 views
0 votes
1 answer

Does AMP validation error affect SEO result?

google wont display your page as AMP ...READ MORE

answered Feb 25, 2022 in Others by narikkadan
• 63,600 points
523 views
0 votes
0 answers

Fetch data from database in php through AJAX,

The index.php  I created a connection with the ...READ MORE

Jun 16, 2022 in PHP by narikkadan
• 63,600 points
8,151 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP