Optimizing Site Navigation and Structure: Removing SEO Roadblocks





Blog Date

June 2, 2024


UK, Manchester

Follow us on


Table of Contents

Optimizing Site Navigation and Structure: Removing SEO Roadblocks

Optimizing Site Navigation and Structure: Removing SEO Roadblocks

As a Java developer, I’ve spent most of my career working on the behind-the-scenes parts of software systems. You know, the stuff that makes everything tick but that users never really see. But lately, I’ve found myself drawn to the front-end, the user-facing parts of applications. And that’s how I ended up building my first single-page app (SPA) as a hobby project.

I chose to use JHipster, a popular development platform that lets you build web apps using modern technologies like Angular, React, or Vue for the client-side and Spring for the back-end. Within a few weeks, I had a working application that met all my needs. But then something unexpected happened – other people started using it!

Knowing I had created something useful for a larger audience was really satisfying. So, I poured my heart and soul into improving the app, working on it night and day, weekends, and every spare moment I had. But the more I tried to enhance it, the harder things got. I kept running into roadblocks that felt like they were holding me back.

It wasn’t until later that I realized the root cause of many of these issues – the technology choices I had made when setting up the project. You see, while JHipster and Angular are powerful and popular tools, they also come with some unique challenges when it comes to SEO, social sharing, and caching. Challenges that I, as a back-end focused developer, simply didn’t anticipate.

In this article, I want to share some of the key lessons I learned the hard way when building my first SPA. Hopefully, this will help other developers avoid the same pitfalls I faced and optimize their site navigation and structure to remove SEO roadblocks.

The SEO Struggle

One of the first issues I ran into was around search engine optimization (SEO). As a back-end developer, I knew the importance of making sure my application was easy for search engines to crawl and index. After all, what’s the point of building an amazing site if no one can find it?

Well, it turns out that traditional SEO practices don’t always apply to single-page apps. You see, in a traditional web application, the server sends back a complete HTML document for each page. The browser then renders that HTML, and search engines can easily understand the content and structure of the page.

But in an SPA, the initial HTML response from the server is just a bare-bones template. The real content and functionality is delivered through JavaScript files that the browser downloads and executes. And that’s where the problem lies – search engines don’t always do a great job of executing JavaScript and understanding the dynamically generated content.

When I looked at the search analytics for my site, I was dismayed to see that Google was only ranking me for a single keyword. And it had nothing to do with the actual content of my app! Turns out, Google’s crawler was just picking up on some generic developer information in the template HTML, and incorrectly associating my site with Maven proxy configuration.

Hurrdat Marketing emphasizes that a website is the foundation for all digital marketing efforts, and it’s crucial to have a mobile-friendly, search-optimized site with simple navigation and good user experience. Clearly, I had some work to do to get my SPA to that level.

Social Sharing Struggles

Another area where I ran into trouble was social sharing. When users started sharing links to my site on various social media platforms, I noticed that the previews being generated were not very helpful. Instead of showing relevant information about the specific page being shared, they were all the same – just the generic template HTML.

The reason for this is that social networks, just like search engines, rely on the metadata in the HTML to understand what a page is about. They use this metadata to generate those rich previews with titles, descriptions, and images. But in an SPA, where the real content is hidden behind JavaScript, social networks were left with just the bare template to work with.

This meant that whether someone was sharing a custom piece of content they had created, or one of the static pages I had built, the preview would always be the same. Not exactly the best way to entice people to click through and explore my site.

Caching Conundrum

Another area I quickly became concerned with was caching. As my user base started to grow, I became worried about the performance of my application. Were my database queries optimized? Would new users get frustrated by slow page loads?

One of the first things I decided to tackle was caching. I integrated CloudFlare’s page caching to help reduce the load on my server. This seemed like a great solution – CloudFlare would cache the server responses, and users would get blazing fast page loads.

But when I checked the results, I was surprised to find that there wasn’t much of a difference in my server resource utilization. What was going on?

It turns out that because CloudFlare was caching the initial template HTML, and not the dynamically generated content, it wasn’t actually reducing the number of requests my server had to handle. The users were still waiting for the JavaScript to load and make all the necessary API calls to fetch the real page content.

Technology Envy and Regrets

As I continued to work on my SPA, I found myself constantly frustrated by the technology choices I had made. Whenever I wanted to add a new feature or page, I had to navigate through multiple areas of Angular code – routers, controllers, services, templates, etc. I was constantly looking things up, and going down rabbit holes trying to figure out “problems” that were really just a result of my own decisions.

I couldn’t help but feel a bit of technology envy as I saw other developers building amazing things with the latest frameworks and libraries. I thought to myself, “I really ought to know how to use those things.” But in my haste to learn something new, I failed to consider how it would impact the long-term development and maintenance of my application.

Eventually, I realized that the excitement of learning a new technology had blinded me to the practical realities of building a real-world product. The choices I made early on were now making it much harder for me to add new features or make meaningful improvements.

Overcoming the Roadblocks

So, what did I do? Well, after a lot of soul-searching, I decided to bite the bullet and re-write most of my application using a technology stack that was more familiar to me. It was a tough decision, but I knew it was the right thing to do if I wanted to continue growing and improving my project.

The new version of the app is built on a more traditional web architecture, with a back-end API and a front-end that uses server-rendered templates. This has allowed me to address many of the SEO, social sharing, and caching issues I faced with the original SPA.

For example, by using server-rendered templates, I can now ensure that search engines and social networks have access to the full content of my pages, not just a generic template. And by leveraging caching at the server level, I can dramatically reduce the load on my database and provide a snappy user experience.

Of course, re-writing an entire application is no small feat, and it’s not a decision to be made lightly. But in my case, I felt it was necessary to ensure the long-term success and sustainability of my project.

Lessons Learned

Looking back on my experience, there are a few key lessons I’ve taken away:

  1. Technology Choices Matter: When selecting the tools and frameworks for your project, think carefully about the long-term implications, not just the short-term excitement of learning something new.

  2. SEO and Social Sharing are Critical: Don’t underestimate the importance of making your site accessible to search engines and social networks. Failing to do so can severely limit your reach and visibility.

  3. Caching is Crucial for Performance: Implement caching strategies early on to ensure your application can handle growing traffic and user demands without sacrificing performance.

  4. Adaptability is Key: Be willing to re-evaluate your decisions and make tough choices if necessary. Sometimes, the best path forward is to start over with a different approach.

As I look back on my journey, I can’t help but feel a sense of pride in what I’ve accomplished. Sure, I made some mistakes along the way, but that’s all part of the learning process. And now, I’m armed with a wealth of knowledge and experience that I can apply to future projects.

If you’re embarking on your own SPA journey, I hope you can learn from my mistakes and avoid the roadblocks I faced. And remember, no matter what technology you choose, the most important thing is to keep learning, adapting, and never losing sight of your ultimate goals.

Happy coding!

Copyright 2023 © MCRSEO.ORG