Skip to content

GitHub / GitHub Pages

GitHub Pages serves static HTML files from a repository. Since it doesn’t support server-side code execution, you cannot intercept requests at the server level.

However, there are two integration paths depending on your setup.

Option 1: Cloudflare in Front of GitHub Pages

Section titled “Option 1: Cloudflare in Front of GitHub Pages”

The recommended approach is to proxy GitHub Pages through Cloudflare:

  1. Point your domain’s DNS to Cloudflare (not directly to GitHub Pages)
  2. In Cloudflare DNS, set your A or CNAME record pointing to GitHub Pages with Proxied mode (orange cloud)
  3. Add a Cloudflare Worker using the Cloudflare Workers integration

This way:

  • Your static files are still hosted on GitHub Pages
  • Cloudflare intercepts all requests before they reach GitHub
  • Bots are sent to SeoRend; regular users go straight to GitHub Pages
Bot → Cloudflare Worker → SeoRend → HTML
User → Cloudflare Worker → GitHub Pages

If your project is a JavaScript SPA (React, Vue, Angular), consider moving to a platform that supports server-side middleware:

PlatformIntegration
VercelVercel Edge Middleware
NetlifyNetlify Edge Functions
HerokuHeroku / Node.js
Self-hostedNGINX + Node.js

You can use GitHub Actions to automate SeoRend-related tasks:

Trigger a cache warm for your important pages after every production deployment:

.github/workflows/warm-cache.yml
name: Warm SeoRend Cache
on:
deployment_status:
jobs:
warm:
if: github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest
steps:
- name: Warm important pages
run: |
PAGES=(
"https://example.com/"
"https://example.com/pricing"
"https://example.com/features"
"https://example.com/about"
)
for url in "${PAGES[@]}"; do
echo "Warming: $url"
curl -s -X POST https://render.seorend.com/v1/render \
-H "Authorization: Bearer ${{ secrets.SEOREND_API_KEY }}" \
-H "Content-Type: application/json" \
-d "{\"url\":\"$url\",\"userAgent\":\"Googlebot/2.1\"}" \
| jq -r '" cache: \(.cache.hit), time: \(.timings.total_ms)ms"'
done
env:
SEOREND_API_KEY: ${{ secrets.SEOREND_API_KEY }}

In your repository:

  1. Go to Settings → Secrets and variables → Actions
  2. Click New repository secret
  3. Name: SEOREND_API_KEY, Value: your SeoRend API key

Add a smoke test to verify SeoRend returns content:

.github/workflows/ci.yml
- name: Test SeoRend integration
run: |
RESPONSE=$(curl -s -A "Googlebot/2.1" -I https://example.com/)
if echo "$RESPONSE" | grep -q "x-seorend-cache"; then
echo "✓ SeoRend is working"
else
echo "✗ SeoRend headers not found"
exit 1
fi
Use CaseRecommendation
GitHub Pages SPAUse Cloudflare proxy → Cloudflare integration
GitHub Actions CI/CDWarm cache after deploy (see workflow above)
GitHub + VercelUse Vercel middleware
GitHub + NetlifyUse Netlify edge functions