How To get a Single Page Application Indexed

The Challenge

Relying heavily on JavaScript to render your page content and provide navigation functionality, brings with it well-known risks in terms of technical SEO, indexing and linkability challenges. Here, I had to come up with a strategy so I could get the pages indexed before I attempted any other SEO strategy.

The Solution

“Single-Page Applications (SPAs) are Web apps that load a single HTML page and dynamically update that page as the user interacts with the app.”

I kept in mind that SPA’s are dynamically generated. The first thing I had to do was to let Google know about each URL. This is where I started a very in-depth XML Sitemap Strategy, which we dubbed Ungoliant. After 3 months of intense XML Optimization, Log File Analysis, and monitoring Google Search Console, we created our Title & Description Tag and Alt Text script called Shelob.

The XML Sitemaps are all .xml.gz compressed and kept at either 50mb or 50 000 URL’s. A basic XML Sitemap structure for client:

We do not use any Priority in our XML Sitemaps. We rely on lastmod.

Having to select pages that’s more important than others just didn’t make sense, so we left out Priority and relied on lastmod 

Google’s John Mueller said on Twitter that Google doesn’t really care much about the priority field in the XML Sitemap, but they do care about the URL and last modification date. Read here!

XML Sitemaps

The XML Sitemaps are all .xml.gz compressed and kept at either 50mb or 50 000 URL’s. A basic XML Sitemap structure for client:

<–Sitemap Location on Robots.txt–>

Sitemap: https://domain/sitemap_index_tag_products.xml

<–Multiple Sitemap Management  (compressed)–>

<?xml version=”1.0″ encoding=”UTF-8″?>   <sitemapindex xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>

<sitemap>

<loc>http://www.example.com/sitemap_profiles_AA.xml.gz</loc>

<lastmod>2004-10-01T18:23:17+00:00</lastmod>  

</sitemap>

<sitemap>

<loc>http://www.example.com/sitemap_profiles_AB.xml.gz</loc>

<lastmod>2005-01-01</lastmod>

</sitemap>

</sitemapindex>

<–Sitemap with  Single URL & Image Information–>

<?xml version=”1.0″ encoding=”UTF-8″?>

<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″  xmlns:image=”http://www.google.com/schemas/sitemap-image/1.1″ xmlns:xhtml=”http://www.w3.org/1999/xhtml”>

<url>

<loc>https://domain/profile/danielv/</loc>

<image:image>   

<image:loc>https://domain/services/rest/profiles/DanielV/photo/1494320904.76.jpg</image:loc>

</image:image>

</url>

<url>

<loc>https://domain/profile/aalberts/</loc>

<image:image>

<image:loc>https://domain/services/rest/profiles/aalberts/photo/1485806668.92.jpg</image:loc>

</image:image>

</url>

</urlset>

Next Challenge

Our next challenge was deciding how often we would generate the XML Sitemaps. Due to the large scale, we didn’t want to generate on a daily basis, if the platform expanded 10x, we might start running into problems.

After each XML Sitemap update, we submitted the XML Sitemap to Search Console and monitored our Log Files.

For the first month, Google crawled regularly with each update, after 2 months, this was less frequent. My guess is that they started to form a

pattern and had enough information to know when to recrawl certain URL’s, so we went from updating twice a week, to updating once a week.

Every time we updated the XML Sitemaps, we saw the Google Crawler requesting our INDEX File, but not requesting all of the XML Sitemaps.

By then, we knew that once a week was ideal, and we stopped by instead submitting manually to Search Console.

I found that fixing some SPEED errors had improved our Crawl Budget. Another test I did was testing 4 new URL’s, two were left untouched, and for the other two, I created backlinks from Pinterest to them. The two that received backlinks from Google were recrawled and indexed before the two that didn’t.

Increasing Total Clicks & Total Impressions

Increasing Total Clicks & Total Impressions & Avg Position.

Keep in mind, this client came to me to get indexed. Strategies will be put in place to rank higher later on.

We are facing a couple of problems with Structured Data. What we did was to use the Data Highlighter in Search Console. We are currently busy writing a script to inject Structured Data, as well as looking into a rel=canonical strategy.

Structured Data | Currently in Test Mode (BETA)

%

Indexed Pages Increased with

%

Avg Keyword Clicks Increased with

%

XML Sitemap Products Indexed Increased with

Click to rate this post!
[Total: 0 Average: 0]
Share This