StackPath

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

  1. Visit: https://www.stackpath.com/
  2. Click Start Free Trial or Sign Up
  3. Verify email, log in to the StackPath Dashboard

🔹 Step 2: Create a Site (CDN Stack)

  1. Go to the Sites section
  2. Click Create Site
  3. Choose CDN Site
  4. Enter your Site Name and Origin (your server or S3 bucket URL, like mybucket.s3.amazonaws.com)
  5. 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):

  1. Go to your DNS provider
  2. Create a CNAME:
    • cdn.yourdomain.com → your-site.stackpathcdn.com
  3. 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):

  1. Go to: Account → API Management
  2. Click Create Credential
  3. 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.


Leave a Reply