Host your Notion Site on a custom domain with Cloudflare Workers. Maintained by Classmethod Europe - a Cloudflare and Notion partner.
Core
- Custom domain hosting for Notion Sites
- Pretty URLs with automatic slug mapping
- Global CDN delivery via Cloudflare edge network
- Full compatibility with latest Notion client (auto-adapts to Notion updates)
SEO & Social
- Page title, description, and per-page metadata
- Open Graph and Twitter Card optimization
- JSON-LD structured data for rich snippets
- Sitemap and RSS feed generation
- AI crawler attribution meta tags
- Custom favicon support
- Internationalization (hreflang) support
- Dynamic OG image generation
Analytics & Marketing
- Google Analytics 4 integration
- Facebook Pixel tracking
- Cache-Control headers for performance
Customization
- Google Fonts integration
- Custom CSS and JavaScript injection
- Custom HTML header injection
- Custom 404 error page
- URL redirect rules (301/302)
- Subdomain redirects
Performance
- Image optimization via Cloudflare Image Resizing
- Edge caching of rewritten Notion JS to keep Worker CPU time low
- Configurable caching for HTML, assets, and images
Reliability
- Automated Notion client-side change monitoring
- Daily checks for breaking changes in Notion's JS/API
- Auto-created GitHub Issues when changes detected
Worknot generates a Cloudflare Worker script that acts as a reverse proxy between your custom domain and Notion. The Worker:
- Intercepts requests to your custom domain
- Fetches page content from Notion's servers
- Rewrites domain references, SEO tags, and JavaScript bundles
- Serves the content on your domain with full customization
Unlike simple redirects, Worknot preserves your custom domain in the browser URL bar and gives you full control over SEO, analytics, and branding.
Visit the generator at https://worknot.classmethod.live/
- Enter your domain and Notion page URL
- Configure pretty links and advanced settings
- Copy the generated Worker script
- Deploy to Cloudflare Workers
The Notion client loads several hundred JS chunks and API calls from your domain, so a first visit makes roughly 700 Worker requests. Repeat visits load the JS from the browser cache. The Workers Free plan (100,000 requests/day) suits small sites; use Workers Paid for sites with real traffic. Rewritten JS chunks are kept in Cloudflare's edge cache, so most requests use very little CPU time.
nvm use 24
npm install
npm start # Development server
npm run build # Production buildWorknot includes automated monitoring for Notion client-side changes that could break the proxy. A daily GitHub Actions workflow checks:
- Notion client version updates
- Domain validation logic changes in JS bundles
- API response structure changes (
getPublicPageData) - New authentication/redirect patterns
When changes are detected, an issue is automatically created. See scripts/notion-monitor.sh for details.
The same workflow runs a rendering check (npm run check:render, see scripts/render-check.mjs). It generates a worker for a public test page, runs it with wrangler dev, and loads the page in Chromium. It checks database views, images, PDF and file blocks, Mermaid, anchor links, database items and browser history. Every check also runs against notion.site, and only failures that happen through Worknot alone are reported. To run it locally, run npx playwright install chromium first.
MIT