To set up StackPath as a CDN for your website or storage (like S3), here’s how you can create credentials, configure the CDN, and use it to deliver assets:
✅ Step-by-Step: Set Up StackPath CDN
🔹 Step 1: Create a StackPath Account
- Visit: https://www.stackpath.com/
- Click Start Free Trial or Sign Up
- Verify email, log in to the StackPath Dashboard
🔹 Step 2: Create a Site (CDN Stack)
- Go to the Sites section
- Click Create Site
- Choose CDN Site
- Enter your Site Name and Origin (your server or S3 bucket URL, like
mybucket.s3.amazonaws.com) - Click Continue
🔹 Step 3: Configure Origin Settings
- Origin Address: Enter your S3 bucket URL or server IP
- Origin Host Header: Optional, but usually the same as origin domain
- Origin Port: 80 (HTTP) or 443 (HTTPS)
Then click Create Site
🔹 Step 4: Update DNS (Optional Custom Domain)
You’ll receive a CDN URL like:
your-site.stackpathcdn.com
If you want to use a custom domain (e.g., cdn.yourdomain.com):
- Go to your DNS provider
- Create a CNAME:
cdn.yourdomain.com → your-site.stackpathcdn.com
- In StackPath: Go to your site’s Settings → Domains, and add the custom domain
🔹 Step 5: Create API Credentials (For automation)
To programmatically access StackPath features (e.g., purge cache):
- Go to: Account → API Management
- Click Create Credential
- Copy the Client ID and Client Secret
Use these in your code or server to authenticate API requests.
✅ Done! You can now serve assets like:
https://your-site.stackpathcdn.com/path/to/file.jpg
Or your custom CDN domain.