Everything you need to integrate, configure, and get the best out of your CDN.
Mylink Speestar is a reverse-proxy CDN that caches static assets from your origin server and serves them at edge speed. Instead of your visitors hitting your origin for every image, stylesheet, or script — those files are fetched once, cached, and delivered directly by Mylink Speestar on all subsequent requests.
It is designed to be simple to set up: no CLI tools, no complicated config files. You create a site, get your API token, point your assets at the CDN URL, and that is it.
cdn.yoursite.com).Use the sidebar on the left to navigate sections, or the prev/next buttons at the bottom of each page. If you are new, follow the Quick Start guide. If you need to integrate programmatically, see Integration Overview or jump straight to the API Reference.
Go from zero to serving cached assets in under five minutes.
Register at https://mylink.ng/auth/register. After verifying your email you will land on the dashboard.
Go to My Sites → Add Site and fill in:
| Field | Description |
|---|---|
Name | A human-readable label (e.g. "My Blog") |
Origin URL | Your server's base URL — e.g. https://yoursite.com |
Slug | Short identifier used in CDN URLs — e.g. myblog |
Referer | Optional. Lock requests to a specific origin domain. |
Open the site you just created, reveal the API Token, and copy it. You will use this token to authenticate purge requests and integration scripts. Keep it secret — treat it like a password.
Replace your origin asset URLs with the CDN URL shown on the site detail page:
https://speed.mylink.ng/{slug}/{path/to/asset.ext}
Example: if your origin serves https://yoursite.com/assets/app.css:
https://speed.mylink.ng/myblog/assets/app.css
Open your site detail page — you will see requests appear in the Recent Requests log within seconds. First hit = MISS (fetched from origin), all after = HIT (from cache).
All API and integration requests are authenticated via a per-site API token. Tokens are scoped to a single site and can be regenerated at any time.
Go to Dashboard → My Sites → [your site] → API Token. Click the eye icon to reveal the full token, then copy it. Every site has its own unique token.
?token= query parameter to authenticate cache purge requests..env file) and reference it in deploy scripts or CMS plugins.GET https://mylink.ng/api/purge?token=YOUR_TOKEN&slug=YOUR_SLUG
Never hard-code your token in public files or commit it to a repository. Store it as an environment variable on your server:
CDN_TOKEN=your_token_here CDN_SLUG=your_slug_here CDN_BASE=https://speed.mylink.ng/your_slug
Then reference it in your code:
$token = getenv('CDN_TOKEN');
$slug = getenv('CDN_SLUG');
const token = process.env.CDN_TOKEN; const slug = process.env.CDN_SLUG;
Understanding the request lifecycle helps you debug cache misses, configure origin headers, and get the best performance.
https://speed.mylink.ng/{slug}/{path}.slug + path combination.origin_url + path), stores the response in cache, then returns it to the visitor.Any path your origin returns a 200 OK for will be cached. Non-200 responses (redirects, 404s, 500s) are not cached — the CDN returns the status transparently and marks the request as a miss.
The cache key is the combination of site slug + request path (query strings are stripped). Two requests for the same path always hit the same cache entry regardless of query string.
app.abc123.css), every new build automatically creates a new cache entry. No purge needed.
The Bytes Served stat counts bytes delivered to visitors — from both hits and misses. This is the traffic you are saving your origin from serving repeatedly.
A site is the unit of configuration. Each site maps a slug to an origin URL and carries its own API token, stats, and cache.
Slugs must be lowercase and may only contain letters, numbers, hyphens, underscores, and dots:
| Valid | Invalid |
|---|---|
myblog | My Blog (spaces not allowed) |
shop-v2 | shop/v2 (slash not allowed) |
api.prod | API_PROD (uppercase not allowed) |
The origin is your server — the CDN proxies requests there on cache misses. It must be a reachable HTTP/HTTPS URL without a trailing slash.
If you set a Referer, the CDN only serves requests whose Referer header matches. Requests from other origins receive 403 Denied. Leave blank to allow all.
Disabled sites return 503 for all requests. Cached assets are preserved — re-enabling restores service immediately.
Cached assets are stored on the CDN server's filesystem (local driver) or in an S3-compatible object store, depending on your platform's storage configuration.
The CDN does not honour Cache-Control or Expires headers from your origin. All 200 responses are cached indefinitely until purged. This means you should either:
app.v2.css instead of app.css.| Ratio | Meaning |
|---|---|
| < 40% | Cache warming, or origin returning non-cacheable responses |
| 40–70% | Good — improving with traffic |
| > 70% | Excellent — origin load is well reduced |
This section explains everything a developer needs to connect their site or application to Mylink Speestar.
To integrate with Mylink Speestar you need three things from your dashboard:
| Item | Where to find it | Used for |
|---|---|---|
| CDN Base URL | Site Detail → CDN URLs | Prefix all your asset URLs |
| Site Slug | Site Detail → shown in code snippets | Identify your site in API calls |
| API Token | Site Detail → API Token (reveal with eye icon) | Authenticate purge / stats calls |
Every integration follows the same two-step pattern regardless of your tech stack:
yoursite.com/assets/app.css use https://speed.mylink.ng/{slug}/assets/app.css.Your API token is required for any server-side call (purge, stats). Store it as an environment variable — never in source control or client-side code.
GET https://mylink.ng/api/purge?token=YOUR_TOKEN&slug=YOUR_SLUG&path=/assets/app.css
See the specific guides for your stack:
The simplest integration — update your asset src and href attributes, and optionally call the purge API on deploy.
<link rel="stylesheet" href="https://yoursite.com/assets/app.css"> <script src="https://yoursite.com/assets/app.js"></script> <img src="https://yoursite.com/images/hero.jpg">
<link rel="stylesheet" href="https://speed.mylink.ng/YOUR_SLUG/assets/app.css"> <script src="https://speed.mylink.ng/YOUR_SLUG/assets/app.js"></script> <img src="https://speed.mylink.ng/YOUR_SLUG/images/hero.jpg">
Add this to your deploy script (replace values with your actual token and slug from the dashboard):
curl -s "https://mylink.ng/api/purge?token=$CDN_TOKEN&slug=$CDN_SLUG" echo "CDN cache purged"
Two options: use the official plugin (recommended) or add a manual snippet to your theme.
The easiest way to connect WordPress to Mylink Speestar is with the official plugin. It handles URL rewriting, token authentication, and automatic cache purging on post publish/update — no code required.
Official WordPress plugin — URL rewriting + auto cache purge on publish.
After installing and activating the plugin, go to Settings → Speestar and enter:
If you prefer not to install a plugin, add the following to your theme's functions.php. You will also need to manage purging manually or via a deploy script.
Add this to functions.php — replace YOUR_SLUG with your actual site slug from the dashboard:
define('MYCDN_BASE', 'https://speed.mylink.ng/YOUR_SLUG');
define('MYCDN_TOKEN', getenv('CDN_TOKEN')); // set CDN_TOKEN in your server env
add_filter('script_loader_src', 'mycdn_rewrite', 10, 2);
add_filter('style_loader_src', 'mycdn_rewrite', 10, 2);
function mycdn_rewrite($src) {
if (is_admin()) return $src;
return str_replace(home_url(), MYCDN_BASE, $src);
}
// Also rewrite media / uploaded images
add_filter('wp_get_attachment_url', 'mycdn_rewrite');
add_filter('wp_calculate_image_srcset', function($sources) {
foreach ($sources as &$s) {
$s['url'] = mycdn_rewrite($s['url']);
}
return $sources;
});
Add this to automatically purge the CDN when a post is published or updated:
add_action('save_post', 'mycdn_purge_on_save', 10, 2);
function mycdn_purge_on_save($post_id, $post) {
if (wp_is_post_revision($post_id) || $post->post_status !== 'publish') return;
$token = MYCDN_TOKEN;
$slug = 'YOUR_SLUG';
wp_remote_get(
"https://mylink.ng/api/purge?token={$token}&slug={$slug}",
['blocking' => false, 'timeout' => 3]
);
}
Add to your wp-config.php or server .env:
putenv('CDN_TOKEN=YOUR_API_TOKEN_FROM_DASHBOARD');
is_admin() check above handles the admin panel — also ensure caching plugins exclude /wp-json/ and /wp-admin/ from their own rewrites.
Configure Laravel's asset URL helper to point to the CDN and automate cache purging on deploy.
.envAdd your CDN details to your Laravel .env file. Get these from your site detail page in the dashboard:
ASSET_URL=https://speed.mylink.ng/YOUR_SLUG CDN_TOKEN=your_api_token_from_dashboard CDN_SLUG=your_slug
Setting ASSET_URL tells Laravel's asset() helper to automatically prefix all asset URLs with your CDN base. No code changes needed in blade templates.
If you use Vite, set the base in vite.config.js:
export default defineConfig({
base: 'https://speed.mylink.ng/YOUR_SLUG/',
// ...
});
Add a purge call to your deploy script. The token and slug come from your .env so they are never hard-coded:
php artisan migrate --force php artisan config:cache php artisan view:cache # Purge CDN cache after deploy curl -s "https://mylink.ng/api/purge?token=$CDN_TOKEN&slug=$CDN_SLUG" echo "CDN cache purged"
You can also purge from within Laravel — for example, in a model observer or after content updates:
use Illuminate\Support\Facades\Http;
Http::get('https://mylink.ng/api/purge', [
'token' => env('CDN_TOKEN'),
'slug' => env('CDN_SLUG'),
'path' => '/assets/app.css', // omit to purge everything
]);
The Mylink Speestar API is a lightweight HTTP API. All endpoints accept GET requests and return JSON.
https://mylink.ng/api
Pass your site's token as a query parameter on every request. See Authentication for how to get and store your token.
{ "ok": true, "message": "Cache purged.", "purged": 14 }
{ "ok": false, "error": "Invalid token." }
| Endpoint | Method | Description |
|---|---|---|
/api/purge | GET | Purge cached assets — requires token + slug |
/api/stats | GET | Fetch site statistics — requires token + slug |
Invalidates cached assets for a site — either a single path or the entire cache. Requires your API token.
https://mylink.ng/api/purge
| Parameter | Required | Description |
|---|---|---|
token | Yes | Your site API token — find it on the site detail page |
slug | Yes | Your site slug |
path | No | Specific path to purge (e.g. /assets/app.css). Omit to purge the entire site. |
curl "https://mylink.ng/api/purge?token=YOUR_TOKEN&slug=YOUR_SLUG&path=/assets/app.css"
curl "https://mylink.ng/api/purge?token=YOUR_TOKEN&slug=YOUR_SLUG"
// Store your token server-side — never expose it in client JS
const res = await fetch(
'https://mylink.ng/api/purge?token=TOKEN&slug=SLUG'
);
const data = await res.json();
console.log(data.ok, data.message, 'purged:', data.purged);
$token = getenv('CDN_TOKEN');
$slug = getenv('CDN_SLUG');
$url = "https://mylink.ng/api/purge?token={$token}&slug={$slug}";
$json = file_get_contents($url);
$data = json_decode($json, true);
// $data['ok'] === true on success
{ "ok": true, "message": "Cache purged.", "purged": 14 }
purged is the number of cached entries deleted.
Retrieve request statistics for a site programmatically. Requires your API token.
https://mylink.ng/api/stats
| Parameter | Required | Description |
|---|---|---|
token | Yes | Your site API token |
slug | Yes | Your site slug |
curl "https://mylink.ng/api/stats?token=YOUR_TOKEN&slug=YOUR_SLUG"
{
"ok": true,
"stats": {
"total": 1482,
"hits": 1241,
"misses": 201,
"denied": 30,
"errors": 10,
"bytes": 94371840
},
"hit_ratio": 83
}
Each plan defines the resources available to your account. View and upgrade from Dashboard → Billing & Plans.
| Resource | Description |
|---|---|
| Sites | Maximum number of CDN sites you can create |
| Requests / month | Total CDN requests across all your sites |
| Bandwidth / month | Total bytes served from cache |
Exact limits for each plan are shown on the Pricing page.
When you exceed a plan limit, CDN requests may be throttled until the next billing cycle or until you upgrade. You will receive an email before limits are reached.
Go to Dashboard → Billing & Plans, select a new plan, and complete payment. Limits are raised immediately after confirmation.
Payments are processed via Paystack or Kora. We do not store card details on our servers.
Plans are billed monthly from the date of subscription. Your plan expiry date is shown in the dashboard sidebar.
You can cancel or downgrade at any time. Your current plan remains active until the expiry date — no prorated refunds.
Payment receipts are listed under Dashboard → Billing & Plans → Payment History. Contact support for a formal invoice.
The first request for every asset is always a miss. Ratios improve as traffic increases. If it stays at 0% after significant traffic, check that your assets return 200 OK — non-200 responses are never cached.
Yes — if your administrator has configured a custom CDN domain in Settings → General, all CDN URLs will use that domain instead of the platform URL.
Call the Purge API for that specific path, or use cache-busted filenames so the old path is never requested again.
Your site has Referer locking enabled and the request's Referer header does not match. See Error Reference.
No. The token is only required for the Purge and Stats API calls. Asset serving (the CDN URLs visitors use) is public and token-free.
The CDN can cache and serve any file type, including video. Large video files may exceed storage limits on your plan — contact support for high-volume media needs.
| Status | Type | Meaning & Fix |
|---|---|---|
403 | DENIED | Blocked by Referer locking. Remove the restriction on the site or ensure requests include the correct Referer header. |
404 | NOT FOUND | Slug does not exist or site is disabled. Verify the slug in your dashboard. |
500 | ERROR | CDN failed to fetch from your origin, or an internal error occurred. Check your origin URL is correct and reachable. |
503 | OFFLINE | Site has been disabled. Re-enable it from the dashboard. |
API {"ok":false} | Invalid token | token is missing, wrong, or belongs to a different slug. Verify token and slug match the same site. |
API {"ok":false} | Site not found | slug does not match any site. Check for typos. |
If you encounter an error not listed here, visit the Contact page with the request URL, the response received, and your site slug.