Explore More Passive Income Ideas

creating a custom 404 page in jekyll that converts

Rethinking the 404 Page in Static Sites When users hit a dead-end on your website, their experience doesn't have to end in frustration. A well-designed 404 page can guide lost visitors back on track, or even convert them into subscribers or customers. In Jekyll, crafting a custom 404 page offers both technical control and creative potential. Why Default 404 Pages Don’t Work The typical 404 page is bland, offers no direction, and causes users to bounce. Search engines also pick up on poor navigation. A custom solution not only improves SEO but also keeps your audience engaged. Creating a 404 Page in Jekyll To create a custom 404 page in Jekyll, all you need is a new file at your site root: 404.html Use your layout or a standalone HTML structure. Example: {% raw %} --- layout: default title: "Page Not Found" permalink: /404.html --- <div class="not-found"> <h2>Oops, this page doesn't exist</h2> <p>But don’t worry, her...

seo friendly pagination techniques in jekyll

Why Pagination Matters for SEO

Pagination plays a critical role in how both users and search engines navigate your content. In a blog or resource-heavy website built with Jekyll, improper pagination can lead to poor indexing, content duplication, and diminished SEO value.

Challenges with Static Pagination

Unlike dynamic CMS platforms that auto-generate paginated archives, Jekyll requires manual configuration. Without a well-thought-out strategy, paginated pages may become SEO dead ends or be ignored entirely by search engines.

Basic Pagination Setup in Jekyll

Jekyll has built-in pagination via the jekyll-paginate or jekyll-paginate-v2 plugin. Here’s the most basic setup:

# _config.yml
plugins:
  - jekyll-paginate
paginate: 5
paginate_path: "/page:num/"

Using the Paginator in Templates

In your index layout:

{% raw %}
{% for post in paginator.posts %}
  <h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
{% endfor %}

<div class="pagination">
  {% if paginator.previous_page %}
    <a href="{{ paginator.previous_page_path }}">Previous</a>
  {% endif %}
  {% if paginator.next_page %}
    <a href="{{ paginator.next_page_path }}">Next</a>
  {% endif %}
</div>
{% endraw %}

Making Pagination SEO-Friendly

Pagination is often misunderstood by search engines. Without proper signals, bots may not crawl past the first page. Here’s how to make it SEO-friendly:

Use Canonical Tags

Ensure each paginated page has a canonical URL pointing to itself:

<link rel="canonical" href="{{ page.url | absolute_url }}">

Add rel="next" and rel="prev"

Search engines like Google support rel="next" and rel="prev" to understand paginated series:

{% raw %}
{% if paginator.previous_page %}
  <link rel="prev" href="{{ paginator.previous_page_path | absolute_url }}">
{% endif %}
{% if paginator.next_page %}
  <link rel="next" href="{{ paginator.next_page_path | absolute_url }}">
{% endif %}
{% endraw %}

Custom Titles and Meta Descriptions

Paginated pages shouldn’t have duplicate titles. Use page numbers to differentiate:

<title>Blog - Page {{ paginator.page }}</title>

Also consider adding page-specific meta descriptions for better CTR.

Optimizing Paginated URLs

Keep URLs simple and clean. Avoid parameters (e.g., ?page=2) and use slugs like /page2/. This improves readability and shareability.

Handling Edge Cases

Always provide a fallback for when users or bots land on an empty page due to manual URL entry or broken links. Create a custom 404 page or a redirect to the main blog page.

Using jekyll-paginate-v2 for More Control

The default paginate plugin only supports the index page. To paginate categories, tags, or custom collections, use jekyll-paginate-v2:

# _config.yml
plugins:
  - jekyll-paginate-v2

pagination:
  enabled: true
  per_page: 6
  title: ":title - page :num"
  trail:
    before: 2
    after: 2

With this setup, you can paginate:

  • Category pages
  • Tag archives
  • Author-based pages

Internal Linking for Paginated Archives

Make sure your main blog or category page links to all paginated entries using a "Load More" button or pagination numbers. This helps bots discover every post and avoids orphan content.

Case Study: Static Blog with 200+ Posts

One developer built a static tech blog with over 200 entries using Jekyll. Initially, only the first 10 posts were getting indexed. After implementing rel="next", custom meta titles per page, and internal links from a sitemap page, their organic traffic increased 3x in 60 days.

Tips for Paginated Pages

  • Never noindex paginated pages—Google uses them to crawl deeper.
  • Avoid duplicate content by customizing excerpts or intros.
  • Add structured data like breadcrumbs to assist crawling and display.

Conclusion

Pagination in Jekyll can be both user-friendly and SEO-optimized with the right strategy. From canonical tags to pagination-specific metadata, these simple additions make a big difference in how your content is found and consumed. Static doesn’t mean rigid—with some planning, Jekyll pagination can outperform many dynamic CMS solutions in performance and clarity.


Archives / All Content


© ShiftPathNet . All rights reserved.