Programmatic SEO: How to Boost Your Rankings on Google With a Few Lines of Code

Alexandre Grisey
6 min readMar 3, 2023

--

Results I’ve obtained with programmatic SEO

Wether you’re a developer or a marketing expert, if you‘re looking for a way to make your positioning on Google skyrocket, you’re reading the right article.

I’m going to explain how, with less than 100 lines of code and a few hours or work, I managed to impressively increase the SEO of several of my websites.

Actually, it worked so much that I created a product with ALL the code provided, 👉 right here 👈

But since you’re here, let me explain how programmatic SEO works.

Usually, when we read tutorials that speak about improving SEO, we find the 3 same advices:

  • Have an optimized content (keywords)
  • Have a good reputation (backlinks)
  • Have good tech performances (loading time, accessibility, responsive)

But you know something important we don’t talk about? The code.

I’m not talking about minifying your JavaScript code or adding “alt” attributes to your images.

I’m talking about actual code, that can lead to incredible results when it comes to SEO.

This is called Programmatic SEO.

Here is an example of the increase I’ve had on one of my websites.

Increase of impressions after implementing Programmatic SEO

Impressive, isn’t it?

Not enough? Here is another example, on another website:

23% of clicks increase in a month with Code Driven SEO

23% of clicks increase over a month (to reach 482!), just with programmatic SEO, for my AI project Suit me Up. The website was already online for more than a year with stagnant Google rankings. Then everything changed.

By the end of the article, you’ll understand the logic of programmatic SEO (or what I prefer to call, Code Driven SEO), and have a precise idea of how to implement it to x10 (ore more) your impressions and clicks in a few weeks.

Wait, what? SEO with code? How?

We usually don’t put programmation and SEO in the same sentence.

For several reasons, but mainly because programmers are tech-oriented people, and marketers are marketing-oriented people. Therefore, Code and SEO rarely meet.

And it’s a shame, because a link can be made between these two worlds, and way more easily than you probably think.

First let me tell you a few facts about Code Driven SEO:

👉 Frameworks such as React, Vue and Angular can implement SEO very well

👉 With client-side rendering only (no, you don’t need SSR — server-side rendering — to have a proper SEO)

👉 This can be done in half a day of work

Sounds like a false promise, right? Too good to be true?

Okay then, I’ll explain in 3 steps how to achieve this. Once again, if you want a full explanation, with more details and with code snippets (for React, Vue and Angular), you’ll find a link to my product at the end of the article.

The idea of programmatic SEO

But before detailing the 3 steps, I have to explain what the idea is.

The goal of Code Driven SEO is to target keywords searched on Google that are related to your product, and on which you’d like to see your website appear on Google.

Once these keywords targeted, the idea is to create fake internal pages, every single one of them focusing on a single keyword, with a specific URL.

For example, if you run a chain of bike stores, and find out the keywords are cities, such as Paris or London. The URL you should target could be:

  • www.mywebsite.com/store/london
  • www.mywebsite.com/store/paris
  • www.mywebsite.com/store/madrid

You notices that I said fake internal pages. This is where we will use code.

These pages won’t actually be pages. They’ll all lead to the same view, or component. Only the content (and a few other things) will change.

Now that this is clear, we’re ready to go.

First Step: Create an SEO Strategy

You shouldn’t write a single line of code without knowing where you’re going, no matter what the topic is.

With SEO, it’s even more true.

The first step here is to find the keywords you want to target. For this, use tools such as Google Keyword Planner. Try different keywords, and find some with a good balance between number of searches and competition.

Now, for each of these, you’ll create one URL, like the example I just gave with the bike store. Other elements should be listed as well, like meta description, meta title, etc. I won’t explain here all of these elements, it’d be too long. You’ll find everything in my product linked at the end.

Second Step: Write the Code for SEO

Now it’s time to write some code 🤓

The idea here, is to create a (or use an existing) view or component, and use it for a group of URLs. For example, /store/paris and /store/london will lead to the very same view, technically speaking. Only the URL and some content will change. It’s easy to handle with routes, in any framework.

To adapt the page depending on the URL, you just have to analyze the route query, and adapt the content depending on the parameters.

Other elements should be changed as well, such as the page title and the meta description. You’ll find code snippets to do this in my guide.

The best way to implement all of this, is to create an array of objects, objects that’ll contain every data that should change for every URL. Your code would parse the array, to dynamically create the routes and everything associated to these routes.

This way, adding or removing a URL should be done by adding or removing an object in that array, so in a few minutes, basically.

Then, to help Google crawl these new “pages”, you’ll just have to add these URLs on the footer of your webpage (there is other techniques as well, that I explain in details in my guide).

And… that’s it.

Last Step: Wait, Watch & Adapt

Now, you just have to wait. To monitor the result of your implementation, use the Google Search Console, if you haven’t set it up yet.

You should see the results after a few days, or most likely after a few weeks.

When you start to see some real improvements, analyze which keywords are working the best, which are not working at all, and adapt. Remove some, find new keywords from the working ones, and add them.

And repeat.

Within a few weeks, you should be able to have incredible results.

Voilà.

Now, you know everything to implement a working Code Driven SEO strategy.

This is exactly the strategy I used for my projects. They all had incredible results.

To help you implement it, like I already mentioned, I advise you to buy my online guide, that explains the whole strategy and provides JavaScript code snippets for React, Angular and Vue.

Here is the link : https://www.seo-programming.com/

Take a look at the web page, everything is explained.

Hey! I’m Alex, a developer and solopreneur.

I create a lot of tools and products using different technologies, and write about it. Here are a few of my products:

SEO Programming: A guide to learn how to do SEO with code (and only code!).

Lite Feedback: a feedback popup to integrate on any website, with a single line of code.

AI Photo Forge: a Telegram bot to generate pictures of you, in more than 30 different styles.

And more you can find on my Linktree page !

--

--