Domain
Complete guide to domain management and configuration in MagicWP
Domain Management
Learn how to configure, manage, and optimize your domains in MagicWP. This comprehensive guide covers everything from initial setup to advanced domain configurations.
Domain Setup Overview
What You'll Need
- Registered Domain: Active domain name registration
- DNS Access: Ability to modify DNS records
- MagicWP Account: Active hosting account
- SSL Certificate: Free SSL included with all plans
Domain Types Supported
- Primary Domains: Main domain for your website
- Subdomains: Secondary domains (blog.yoursite.com)
- Addon Domains: Additional domains hosted on same account
- Parked Domains: Domains that redirect to main site
Initial Domain Configuration
Step 1: Add Domain to MagicWP
-
Access Domain Management
- Log in to your MagicWP dashboard
- Navigate to Domains section
- Click Add Domain
-
Enter Domain Information
- Domain Name: Enter your full domain name
- Domain Type: Choose primary, addon, or subdomain
- Document Root: Specify where files will be stored
- SSL Settings: Enable SSL certificate
-
DNS Configuration
- Name Servers: Update to MagicWP nameservers
- A Records: Point to MagicWP IP address
- CNAME Records: Configure subdomains
Step 2: DNS Propagation
- Update Name Servers
if ( ! defined( 'WP_DEBUG' ) ) {
define( 'WP_DEBUG', false );
}
define( 'WP_REDIS_HOST', 'stack-66-redis' );
define( 'WP_REDIS_PREFIX', 'stack-66_' );
/* That's all, stop editing! Happy publishing. */
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', __DIR__ . '/' );
}Typescript Usage
You can use Bun or other JavaScript runtimes that supports TypeScript and ESM.
import defaultComponents from 'fumadocs-ui/mdx';
import type { MDXComponents } from 'mdx/types';
import { CodeBlock, Pre } from 'fumadocs-ui/components/codeblock';
export function getMDXComponents(components?: MDXComponents): MDXComponents {
return {
...defaultComponents,
// HTML `ref` attribute conflicts with `forwardRef`
pre: ({ ref: _ref, ...props }) => (
<CodeBlock {...props}>
<Pre>{props.children}</Pre>
</CodeBlock>
),
...components,
};
}console.log('js');ns1.magicwp.com
ns2.magicwp.comimport { Pre, CodeBlock } from 'fumadocs-ui/components/codeblock';
<CodeBlock keepBackground {...props}>
<Pre>{props.children}</Pre>
</CodeBlock>;-
Wait for Propagation
- DNS changes may take 24-48 hours to propagate globally
- Use tools like
digornslookupto check propagation status
-
Verify Configuration
- Check domain resolves to correct IP
- Test SSL certificate installation
- Verify website loads correctly
DNS Management
DNS Record Types
A Record (Address Record)
Type: A
Name: @
Value: 192.168.1.100
TTL: 3600- Points domain to IP address
- Required for root domain (@)
- Essential for website accessibility
CNAME Record (Canonical Name)
Type: CNAME
Name: www
Value: yourdomain.com
TTL: 3600- Creates alias for domain
- Used for www subdomain
- Redirects to main domain
MX Record (Mail Exchange)
Type: MX
Name: @
Value: mail.yourdomain.com
Priority: 10
TTL: 3600- Routes email to mail server
- Priority determines delivery order
- Essential for email functionality
TXT Record (Text Record)
Type: TXT
Name: @
Value: "v=spf1 include:_spf.magicwp.com ~all"
TTL: 3600- Provides text information about domain
- Used for SPF, DKIM, DMARC
- Important for email authentication
Advanced DNS Configuration
SPF Records
"v=spf1 include:_spf.magicwp.com include:_spf.google.com ~all"- Prevents email spoofing
- Specifies authorized mail servers
- Improves email deliverability
DKIM Records
"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC..."- Digital signature for emails
- Verifies email authenticity
- Required by some email providers
DMARC Records
"v=DMARC1; p=quarantine; rua=mailto:dmarc@yoursite.com"- Email authentication policy
- Handles failed authentication
- Provides reporting capabilities
SSL Certificate Management
Automatic SSL (Let's Encrypt)
- Free SSL: Included with all MagicWP plans
- Auto-Renewal: Certificates renew automatically
- Wildcard Support: Covers all subdomains
- Installation: One-click SSL activation
SSL Configuration Steps
-
Enable SSL in Dashboard
- Go to Domain Settings
- Click Enable SSL
- Choose certificate type
-
SSL Verification
- HTTP validation (recommended)
- DNS validation (for wildcards)
- Email validation (manual)
-
Force HTTPS
- Automatic redirect from HTTP to HTTPS
- Update internal links
- Configure CDN settings
Custom SSL Certificates
-
Upload Certificate Files
- Certificate (.crt or .pem)
- Private Key (.key)
- Certificate Chain (.crt)
-
Install via Dashboard
- Access SSL management
- Upload certificate files
- Configure certificate settings
Domain Redirects and Forwarding
Types of Redirects
301 Redirect (Permanent)
Redirect from: old-domain.com
Redirect to: new-domain.com
Type: 301 (Permanent)- Preserves SEO value
- Tells search engines page moved permanently
- Preferred for SEO
302 Redirect (Temporary)
Redirect from: temporary-page.com
Redirect to: maintenance-page.com
Type: 302 (Temporary)- Indicates temporary move
- Search engines may keep old URL indexed
- Use for temporary changes
Setting Up Redirects
-
Via .htaccess (Apache)
# 301 Redirect Redirect 301 /old-page.html /new-page.html # Domain redirect RewriteEngine On RewriteCond %{HTTP_HOST} ^old-domain\.com$ [NC] RewriteRule ^(.*)$ https://new-domain.com/$1 [R=301,L] -
Via Dashboard
- Access Domain Redirects
- Add new redirect rule
- Specify source and destination
- Choose redirect type
Subdomain Management
Creating Subdomains
-
Add Subdomain
- Go to Subdomain Management
- Enter subdomain name
- Choose document root
- Configure DNS if needed
-
Subdomain Examples
- blog.yoursite.com
- shop.yoursite.com
- api.yoursite.com
- staging.yoursite.com
Subdomain Configuration
DNS Setup
Type: CNAME
Name: blog
Value: yoursite.comDirectory Structure
/public_html/ (main site)
/public_html/blog/ (subdomain directory)Domain Security
Domain Privacy Protection
- WHOIS Privacy: Hide personal information
- Contact Information: Protect against spam
- Domain Theft: Prevent unauthorized transfers
Security Best Practices
- Regular Monitoring: Monitor domain expiration
- DNSSEC: Enable DNS security extensions
- Two-Factor Authentication: Secure domain registrar account
- Transfer Locks: Prevent unauthorized transfers
Performance Optimization
DNS Optimization
- Geographic Distribution: Use CDN for DNS
- Caching: Implement DNS caching
- Redundancy: Multiple DNS servers
Domain-Specific Optimizations
- Preconnect: Preconnect to external domains
- Prefetch: Prefetch DNS for linked resources
- Compression: Enable domain compression
Troubleshooting Domain Issues
Common Problems
DNS Propagation Delays
- Check Propagation: Use online DNS checkers
- Clear DNS Cache: Flush local DNS cache
- Wait Time: Allow 24-48 hours for full propagation
SSL Certificate Issues
- Certificate Not Trusted: Check certificate validity
- Mixed Content: Fix HTTP resources on HTTPS pages
- Certificate Mismatch: Verify domain matches certificate
Domain Not Resolving
- DNS Records: Verify DNS records are correct
- Name Servers: Confirm correct name servers
- TTL Settings: Check time-to-live settings
Diagnostic Tools
DNS Lookup Tools
# Check DNS records
dig yourdomain.com
# Check specific record type
dig TXT yourdomain.com
# Trace DNS resolution
traceroute yourdomain.comSSL Testing Tools
- SSL Labs Server Test
- Qualys SSL Server Test
- SSL Checker tools
Advanced Domain Features
Internationalized Domain Names (IDN)
- Unicode Support: Domains with special characters
- Language Support: Native language domain names
- Browser Compatibility: Cross-browser IDN support
Domain Forwarding
- URL Masking: Hide destination URL
- Frame Forwarding: Display content in frames
- Meta Refresh: HTML-based forwarding
Domain Parking
- Temporary Holding: Park domains for later use
- Monetization: Display ads on parked domains
- Redirection: Redirect to main website
Domain Transfer and Migration
Transferring to MagicWP
-
Unlock Domain
- Remove domain lock at current registrar
- Obtain authorization code
-
Initiate Transfer
- Start transfer in MagicWP dashboard
- Provide authorization code
- Confirm transfer request
-
DNS Updates
- Update name servers during transfer
- Configure DNS records
- Test domain resolution
Transfer Timeframes
- Domain Transfer: 5-7 days
- DNS Propagation: 24-48 hours
- SSL Setup: 1-2 hours
- Full Activation: 7-10 days
Monitoring and Maintenance
Domain Health Monitoring
- Expiration Alerts: Automatic renewal notifications
- DNS Monitoring: Track DNS record changes
- SSL Monitoring: Certificate expiration alerts
Regular Maintenance Tasks
- DNS Updates: Keep records current
- SSL Renewal: Monitor certificate status
- Security Updates: Apply security patches
- Performance Tuning: Optimize domain settings
Support and Resources
Getting Help
- Domain Support: Specialized domain assistance
- DNS Help: DNS configuration support
- SSL Support: Certificate management help
Useful Tools
- DNS Lookup: Online DNS checking tools
- SSL Testers: Certificate validation tools
- Domain Registrars: Domain registration services
- WHOIS Tools: Domain information lookup
Documentation
- DNS Guide: Comprehensive DNS documentation
- SSL Guide: SSL certificate management
- Domain Transfer: Step-by-step transfer guides
Need help with domain configuration? Contact our domain support team or check our troubleshooting guide.