CDN for Laravel
Laravel should render. The CDN should repeat.
Laravel origins spend PHP workers on Vite assets, storage files and anonymous marketing pages that could have been cached.
Point asset and storage URLs at Cloud CDN. Cache anonymous GET pages. Bypass session, CSRF POST and Horizon/admin routes.
Why teams use Aptranet
What CDN for Laravel looks like on this network.
Cloud CDN caches and accelerates eligible content on 210+ points of presence, with Origin Shield when the origin must stay out of the way.
Vite and Mix assets at the edge
Hashed public/build files are served from 210+ PoPs.
public/storage off PHP
User uploads and public disks are cached and can be transformed at delivery time.
Session Blade stays on Laravel
Authenticated dashboards and CSRF-backed forms are not cached.
How to set it up
A cutover you can validate before DNS moves.
Create the Cloud CDN configuration, prove it on an Aptranet hostname, then point production DNS when the path looks correct.
- 1Set ASSET_URL to Cloud CDN
Serve hashed Vite/Mix files from the distribution after origin pull works.
- 2Cache public storage
Map the public disk hostname to Cloud CDN.
- 3Optionally cache marketing HTML
Anonymous landing pages can be cached with purge on deploy.
- 4Bypass the rest
Keep login, dashboard, queues and POSTs on Laravel.
Outcomes
What changes once the hostname is on Aptranet.
- Laravel assets are delivered globally
- Public storage is cached at the edge
- Session pages remain dynamic
- PHP workers spend less time on static files
Keep reading
Related pages
More CDN use cases on the same Cloud CDN footprint.
Frequently Asked Questions
Yes. Cloud CDN sits in front of whichever origin those platforms expose.
Only anonymous pages without CSRF-sensitive forms or session HTML. Most app pages should bypass cache.
Hashed files do not need purge. Purge mix-manifest/unhashed HTML if you cache it.
Private files should stay signed at origin. Cache only public disks.
