🔥 Free .COM Domain with any Shared Hosting Annual Plan! 🚀

CDN FAQ

Answers to common CDN
questions

Everything you need to know about adding CSS and JS CDN links in HTML, using Bootstrap via CDN, hosting your own files, and more.

Back to CDN Libraries

Add a <link> tag inside the <head> section of your HTML file pointing to the CDN URL:

<link rel="stylesheet" href="https://cdn.hostmargin.com/cdn/bootstrap/5.3.3/css/bootstrap.min.css">

Replace the URL with the CDN link of your chosen library. Browse all available libraries on the Hostmargin CDN page.

A CDN (Content Delivery Network) for CSS means hosting a CSS file on globally distributed servers so browsers can load it faster from a server that is geographically closer to the visitor.

Instead of hosting a CSS file on your own server, you reference its CDN URL in your HTML <link> tag. Popular frameworks like Bootstrap, Tailwind, and Animate.css all offer CDN versions for this reason.

Yes. The bootstrap.min.css file served from any CDN — including Hostmargin — includes all Bootstrap utility classes such as d-flex, mt-3, text-center, gap-2, and more.

No extra setup is needed. Simply include the CDN link and all utilities are available immediately.

CDN links should come first, followed by your own stylesheet. This ensures your custom rules load after the framework and can override it without needing !important:

<link rel="stylesheet" href="https://cdn.hostmargin.com/cdn/bootstrap/5.3.3/css/bootstrap.min.css">
<link rel="stylesheet" href="your-styles.css">

No. CDN files are compiled CSS — Sass mixins are a source-level feature and are not present in compiled output.

To use Bootstrap's responsive mixins (e.g. @include media-breakpoint-up(md)), you must install Bootstrap via npm and compile Sass locally in your build pipeline.

Add the Font Awesome CSS CDN link in your HTML <head>. The icon webfonts are automatically loaded from the same CDN origin, so icons render without extra configuration:

<link rel="stylesheet" href="https://cdn.hostmargin.com/cdn/font-awesome/6.5.1/css/all.min.css">

Then use icon classes directly in your HTML: <i class="fa-solid fa-star"></i>

Upload your CSS (or JS, images, fonts, PDFs) to Hostmargin Temp CDN and get a shareable CDN URL instantly — free for 30 days, verified by email OTP, no account required.

The recommended way is to enqueue it in your theme's functions.php:

function my_enqueue_bootstrap() {
    wp_enqueue_style(
        'bootstrap',
        'https://cdn.hostmargin.com/cdn/bootstrap/5.3.3/css/bootstrap.min.css'
    );
}
add_action( 'wp_enqueue_scripts', 'my_enqueue_bootstrap' );

Alternatively, paste the <link> tag directly into your theme's header.php inside the <head> section.

In SharePoint, add the CDN <link> tag to your master page (.master file) inside the <head> section. Alternatively, use a Script Editor web part to inject it on specific pages without modifying the master page.

A CDN URL is served from servers geographically close to the visitor, reducing latency and often benefiting from browser caching if the visitor already loaded the same URL on another site.

Self-hosted files are served from your own origin server, which gives you full control over caching headers, versioning, and availability — but requires more infrastructure.

For popular libraries, CDN delivery is almost always faster and recommended.