Configurer un domaine personnalisé
La configuration d’un domaine personnalisé pour votre site de documentation Dockit aide à établir votre identité de marque et assure une apparence professionnelle. Ce guide couvre le processus complet de configuration de domaines personnalisés sur différentes plateformes d’hébergement.
Un domaine personnalisé vous permet de servir votre documentation depuis votre propre URL de marque au lieu du sous-domaine par défaut du fournisseur d’hébergement. Par exemple:
- Par défaut:
your-docs.netlify.appouyour-docs.vercel.app - Personnalisé:
docs.votreentreprise.comouhelp.votreentreprise.com
Prérequis
Section intitulée « Prérequis »Avant de configurer un domaine personnalisé, assurez-vous d’avoir:
- Propriété du domaine: Vous possédez ou gérez le domaine que vous souhaitez utiliser
- Accès DNS: Possibilité de modifier les enregistrements DNS pour votre domaine
- Site déployé: Votre site Dockit est déjà déployé et fonctionne
- Certificat SSL: Support HTTPS (généralement fourni automatiquement)
Options de configuration de domaine
Section intitulée « Options de configuration de domaine »Configuration de sous-domaine (Recommandé)
Section intitulée « Configuration de sous-domaine (Recommandé) »L’utilisation d’un sous-domaine est l’approche la plus courante et recommandée:
docs.votreentreprise.comhelp.votreentreprise.comsupport.votreentreprise.comknowledge.votreentreprise.comConfiguration de domaine racine
Section intitulée « Configuration de domaine racine »Vous pouvez également utiliser votre domaine racine, bien que cela nécessite des considérations supplémentaires:
votreentreprise.comvotredocs.comConfiguration basée sur le chemin
Section intitulée « Configuration basée sur le chemin »Servir la documentation depuis un chemin spécifique:
votreentreprise.com/docsvotreentreprise.com/helpInstallation spécifique à la plateforme
Section intitulée « Installation spécifique à la plateforme »Configuration Netlify
Section intitulée « Configuration Netlify »Étape 1: Ajouter un domaine personnalisé dans Netlify
Section intitulée « Étape 1: Ajouter un domaine personnalisé dans Netlify »- Accédez aux Site Settings de votre site dans le tableau de bord Netlify
- Naviguez vers Domain management → Custom domains
- Cliquez sur Add custom domain
- Entrez votre domaine (par ex.
docs.votreentreprise.com)
Étape 2: Configurer les enregistrements DNS
Section intitulée « Étape 2: Configurer les enregistrements DNS »Ajoutez un enregistrement CNAME chez votre fournisseur DNS:
Type: CNAMENom: docs (ou votre sous-domaine choisi)Valeur: your-site-name.netlify.appTTL: 3600 (ou Auto)Étape 3: Activer HTTPS
Section intitulée « Étape 3: Activer HTTPS »Netlify verstrekt automatisch SSL-certificaten via Let’s Encrypt:
- Wacht op DNS-propagatie (tot 24 uur)
- SSL-certificaat wordt automatisch uitgegeven
- Forceer HTTPS-omleiding in Site Settings → HTTPS
Stap 4: _redirects configureren (Optioneel)
Section intitulée « Stap 4: _redirects configureren (Optioneel) »Maak een _redirects bestand in je public/ directory:
# Forceer HTTPShttp://docs.jouwbedrijf.com/* https://docs.jouwbedrijf.com/:splat 301!
# Omleiden oude paden/old-docs/* /new-docs/:splat 301/v1/* /latest/:splat 301
# SPA fallback/* /index.html 200Vercel configuratie
Section intitulée « Vercel configuratie »Stap 1: Domein toevoegen in Vercel
Section intitulée « Stap 1: Domein toevoegen in Vercel »- Ga naar je project dashboard
- Navigeer naar Settings → Domains
- Voer je aangepaste domein in
- Kies de deployment branch
Stap 2: DNS configureren
Section intitulée « Stap 2: DNS configureren »Voor subdomeinen, voeg een CNAME-record toe:
Type: CNAMENaam: docsWaarde: cname.vercel-dns.comVoor root domeinen, voeg A-records toe:
Type: ANaam: @Waarde: 76.76.19.61
Type: ANaam: @Waarde: 76.76.19.62Stap 3: Domein verifiëren
Section intitulée « Stap 3: Domein verifiëren »Vercel zal automatisch je domein verifiëren en SSL-certificaten uitgeven.
Stap 4: vercel.json configureren
Section intitulée « Stap 4: vercel.json configureren »{ "redirects": [ { "source": "/old-path", "destination": "/new-path", "permanent": true } ], "headers": [ { "source": "/(.*)", "headers": [ { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Frame-Options", "value": "DENY" }, { "key": "X-XSS-Protection", "value": "1; mode=block" } ] } ]}GitHub Pages configuratie
Section intitulée « GitHub Pages configuratie »Stap 1: Repository-instellingen configureren
Section intitulée « Stap 1: Repository-instellingen configureren »- Ga naar repository Settings → Pages
- Selecteer bron (meestal
mainbranch) - Voeg aangepast domein toe in het Custom domain veld
Stap 2: CNAME bestand maken
Section intitulée « Stap 2: CNAME bestand maken »Maak een CNAME bestand in je repository root of public/ directory:
docs.jouwbedrijf.comStap 3: DNS configureren
Section intitulée « Stap 3: DNS configureren »Voeg een CNAME-record toe die wijst naar GitHub Pages:
Type: CNAMENaam: docsWaarde: jouwgebruikersnaam.github.ioStap 4: HTTPS inschakelen
Section intitulée « Stap 4: HTTPS inschakelen »GitHub Pages verstrekt automatisch SSL-certificaten voor aangepaste domeinen.
Firebase Hosting configuratie
Section intitulée « Firebase Hosting configuratie »Stap 1: firebase.json configureren
Section intitulée « Stap 1: firebase.json configureren »{ "hosting": { "public": "dist", "site": "your-project-id", "cleanUrls": true, "trailingSlash": false, "rewrites": [ { "source": "**", "destination": "/index.html" } ], "headers": [ { "source": "**/*.@(jpg|jpeg|gif|png|svg|webp|js|css)", "headers": [ { "key": "Cache-Control", "value": "max-age=31536000" } ] } ] }}Stap 2: Aangepast domein toevoegen
Section intitulée « Stap 2: Aangepast domein toevoegen »firebase hosting:channel:deploy live --only hostingfirebase hosting:site:get your-project-idVoeg domein toe in Firebase Console:
- Ga naar Hosting sectie
- Klik op Add custom domain
- Volg de verificatiestappen
Stap 3: DNS-configuratie
Section intitulée « Stap 3: DNS-configuratie »Voeg de verstrekte DNS-records toe uit Firebase Console.
DNS Provider voorbeelden
Section intitulée « DNS Provider voorbeelden »Cloudflare DNS
Section intitulée « Cloudflare DNS »Type: CNAMENaam: docsContent: your-site.netlify.appProxy status: Proxied (oranje wolk)TTL: AutoAanvullende Cloudflare-instellingen:
- SSL/TLS: Full (strict)
- Always Use HTTPS: Aan
- Automatic HTTPS Rewrites: Aan
Google Domains
Section intitulée « Google Domains »Type: CNAMENaam: docsData: your-site.netlify.app.TTL: 1 uurNamecheap DNS
Section intitulée « Namecheap DNS »Type: CNAME RecordHost: docsWaarde: your-site.netlify.appTTL: AutomaticRoute 53 (AWS)
Section intitulée « Route 53 (AWS) »{ "Type": "CNAME", "Name": "docs.jouwbedrijf.com", "Value": "your-site.netlify.app", "TTL": 300}SSL-certificaat configuratie
Section intitulée « SSL-certificaat configuratie »Automatische SSL (Aanbevolen)
Section intitulée « Automatische SSL (Aanbevolen) »De meeste moderne hosting platforms bieden automatische SSL:
- Netlify: Let’s Encrypt (automatisch)
- Vercel: Automatische SSL-verstrekking
- GitHub Pages: Automatisch voor aangepaste domeinen
- Firebase: Google-beheerde certificaten
Handmatige SSL-configuratie
Section intitulée « Handmatige SSL-configuratie »Voor geavanceerde setups heb je mogelijk handmatige SSL-configuratie nodig:
server { listen 443 ssl http2; server_name docs.jouwbedrijf.com;
ssl_certificate /path/to/certificate.crt; ssl_certificate_key /path/to/private.key;
ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512; ssl_prefer_server_ciphers off;
location / { proxy_pass http://localhost:3000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; }}Geavanceerde configuratie
Section intitulée « Geavanceerde configuratie »Meerdere domeinen
Section intitulée « Meerdere domeinen »Configureer meerdere domeinen voor dezelfde site:
[[redirects]] from = "https://old-docs.com/*" to = "https://docs.jouwbedrijf.com/:splat" status = 301 force = true
[[redirects]] from = "https://help.jouwbedrijf.com/*" to = "https://docs.jouwbedrijf.com/:splat" status = 301 force = trueInternationalisatie domeinen
Section intitulée « Internationalisatie domeinen »Stel verschillende domeinen in voor verschillende talen:
docs.jouwbedrijf.com (Nederlands)docs-en.jouwbedrijf.com (Engels)docs-de.jouwbedrijf.com (Duits)docs-fr.jouwbedrijf.com (Frans)CDN integratie
Section intitulée « CDN integratie »Configureer CDN voor betere prestaties:
{ "functions": { "app/api/**/*.js": { "maxDuration": 30 } }, "regions": ["iad1", "sfo1", "fra1"], "github": { "enabled": false }}Beveiligings beste praktijken
Section intitulée « Beveiligings beste praktijken »HSTS configuratie
Section intitulée « HSTS configuratie »Schakel HTTP Strict Transport Security in:
Strict-Transport-Security: max-age=31536000; includeSubDomains; preloadContent Security Policy
Section intitulée « Content Security Policy »Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; connect-src 'self'; media-src 'self'; object-src 'none'; child-src 'self'; frame-ancestors 'none'; form-action 'self'; base-uri 'self';Aanvullende beveiligingsheaders
Section intitulée « Aanvullende beveiligingsheaders »X-Content-Type-Options: nosniffX-Frame-Options: DENYX-XSS-Protection: 1; mode=blockReferrer-Policy: strict-origin-when-cross-originPermissions-Policy: geolocation=(), microphone=(), camera=()Prestatie-optimalisatie
Section intitulée « Prestatie-optimalisatie »DNS-optimalisatie
Section intitulée « DNS-optimalisatie »- Gebruik snelle DNS-providers: Cloudflare, Route 53, of Google DNS
- Minimaliseer DNS-lookups: Verminder externe resource-afhankelijkheden
- Schakel DNS prefetching in:
<link rel="dns-prefetch" href="/dockit//example.com">
Caching-strategie
Section intitulée « Caching-strategie »# Statische assetsCache-Control: public, max-age=31536000, immutable
# HTML-bestandenCache-Control: public, max-age=0, must-revalidate
# API-responsenCache-Control: public, max-age=300, s-maxage=600Monitoring en analytics
Section intitulée « Monitoring en analytics »Domein gezondheidsmonitoring
Section intitulée « Domein gezondheidsmonitoring »Stel monitoring in voor je aangepaste domein:
// Basis uptime monitoringasync function checkDomainHealth() { try { const response = await fetch('https://docs.jouwbedrijf.com/health'); if (response.ok) { console.log('Domein is gezond'); } else { console.error('Domein gezondheidscheck gefaald'); } } catch (error) { console.error('Domein is onbereikbaar:', error); }}
setInterval(checkDomainHealth, 300000); // Check elke 5 minutenAnalytics configuratie
Section intitulée « Analytics configuratie »<!-- Google Analytics --><script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script><script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'GA_TRACKING_ID', { custom_map: { 'custom_parameter': 'dimension1' } });</script>Probleemoplossing
Section intitulée « Probleemoplossing »Veelvoorkomende problemen
Section intitulée « Veelvoorkomende problemen »DNS-propagatie vertragingen
Section intitulée « DNS-propagatie vertragingen »DNS-wijzigingen kunnen tot 48 uur duren om wereldwijd volledig te propageren:
# Check DNS-propagatiedig docs.jouwbedrijf.comnslookup docs.jouwbedrijf.comOnline tools:
- whatsmydns.net
- dnschecker.org
SSL-certificaat problemen
Section intitulée « SSL-certificaat problemen »Veelvoorkomende SSL-problemen en oplossingen:
- Mixed content fouten: Zorg ervoor dat alle resources HTTPS gebruiken
- Certificaat mismatch: Verifieer dat domeinnamen overeenkomen met certificaat
- Verlopen certificaten: Stel auto-vernieuwing in
Omleidingslussen
Section intitulée « Omleidingslussen »Voorkom oneindige omleidingen:
# Incorrecthttps://docs.jouwbedrijf.com → https://docs.jouwbedrijf.com
# Correcthttp://docs.jouwbedrijf.com → https://docs.jouwbedrijf.comPrestatieproblemen
Section intitulée « Prestatieproblemen »Diagnoseer en los prestatieproblemen op:
# Test site snelheidcurl -w "@curl-format.txt" -o /dev/null -s "https://docs.jouwbedrijf.com"
# Check response headerscurl -I "https://docs.jouwbedrijf.com"Debug tools
Section intitulée « Debug tools »DNS debugging
Section intitulée « DNS debugging »# Check A-recordsdig A docs.jouwbedrijf.com
# Check CNAME-recordsdig CNAME docs.jouwbedrijf.com
# Check MX-recordsdig MX jouwbedrijf.com
# Trace DNS-resolutiedig +trace docs.jouwbedrijf.comSSL debugging
Section intitulée « SSL debugging »# Check SSL-certificaatopenssl s_client -connect docs.jouwbedrijf.com:443 -servername docs.jouwbedrijf.com
# Test SSL-configuratiecurl -vI https://docs.jouwbedrijf.comMigratie strategieën
Section intitulée « Migratie strategieën »Zero-downtime migratie
Section intitulée « Zero-downtime migratie »Plan voor naadloze domeinmigratie:
- Nieuw domein voorbereiden: Volledig instellen en testen
- DNS bijwerken met lage TTL: Propagatietijd verkorten
- Traffic monitoren: Letten op eventuele problemen
- Omleidingen implementeren: Gebruikers naar nieuw domein leiden
- Interne links bijwerken: Alle referenties wijzigen
- Gebruikers informeren: De wijziging communiceren
Migratie checklist
Section intitulée « Migratie checklist »- Domein eigendom geverifieerd
- DNS-records geconfigureerd
- SSL-certificaat actief
- Omleidingen geïmplementeerd
- Interne links bijgewerkt
- Externe referenties geïnformeerd
- Analytics tracking bijgewerkt
- SEO-overwegingen aangepakt
- Monitoring alerts geconfigureerd
- Rollback plan voorbereid
Beste praktijken
Section intitulée « Beste praktijken »- Kies betekenisvolle subdomeinen: Gebruik duidelijke, beschrijvende namen
- Schakel overal HTTPS in: Serveer nooit content over HTTP
- Monitor domein gezondheid: Stel uptime monitoring in
- Plan voor rampen: Heb backup domeinen klaar
- Documenteer je setup: Houd configuratierecords bij
- Regelmatig onderhoud: Review en update configuraties
- Beveiliging eerst: Implementeer juiste headers en beleid
- Prestaties zijn belangrijk: Optimaliseer voor snelheid en betrouwbaarheid
Conclusie
Section intitulée « Conclusie »Het instellen van een aangepast domein voor je Dockit documentatiesite verbetert je merkpresentatie en biedt een professionele ervaring voor je gebruikers. Volg de platform-specifieke instructies, implementeer juiste beveiligingsmaatregelen en monitor je domein’s gezondheid voor de beste resultaten.
Vergeet niet om grondig te testen in een staging-omgeving voordat je wijzigingen aanbrengt aan productie domeinen, en heb altijd een rollback plan klaar voor het geval van problemen.