Overview
The DNI Cita Previa project is a static website that can be hosted on any platform that supports HTML, CSS, and JavaScript files. This guide covers the most popular and recommended deployment options.GitHub Pages
GitHub Pages is a free hosting service perfect for static websites.Prerequisites
- GitHub account
- Git installed locally
- Repository containing your project
Deployment Steps
Step 1: Push Code to GitHub
Step 1: Push Code to GitHub
Step 2: Enable GitHub Pages
Step 2: Enable GitHub Pages
- Go to your repository on GitHub
- Click Settings tab
- Scroll down to Pages section
- Under “Source”, select Deploy from a branch
- Choose branch: main and folder: / (root)
- Click Save
Step 3: Access Your Site
Step 3: Access Your Site
Your site will be available at:Deployment typically takes 1-2 minutes.
Custom Domain (Optional)
| Type | Name | Value |
|---|---|---|
| CNAME | www | yourusername.github.io |
| A | @ | 185.199.108.153 |
| A | @ | 185.199.109.153 |
| A | @ | 185.199.110.153 |
| A | @ | 185.199.111.153 |
GitHub Pages supports HTTPS automatically for both
*.github.io domains and custom domains.Netlify
Netlify offers continuous deployment with advanced features like form handling and serverless functions.Method 1: Drag & Drop
- Visit netlify.com
- Sign up or log in
- Drag your project folder to the Netlify dashboard
- Your site is live instantly!
Method 2: Git Integration
Step 1: Connect Repository
Step 1: Connect Repository
- Log in to Netlify
- Click Add new site → Import an existing project
- Choose GitHub (or GitLab/Bitbucket)
- Authorize Netlify to access your repositories
- Select your DNI Cita Previa repository
Step 2: Configure Build Settings
Step 2: Configure Build Settings
Since this is a static site with no build process:
- Build command: Leave empty
- Publish directory:
./(or leave empty) - Production branch:
main
Step 3: Custom Domain
Step 3: Custom Domain
- Go to Site settings → Domain management
- Click Add custom domain
- Enter your domain name
- Follow DNS configuration instructions
Netlify Configuration File
Createnetlify.toml in your project root for advanced settings:
Vercel
Vercel provides fast global deployment with edge network optimization.Deploy with Vercel CLI
Deploy via Git
- Push code to GitHub/GitLab/Bitbucket
- Visit vercel.com
- Click Add New → Project
- Import your repository
- Click Deploy
Vercel Configuration
Createvercel.json in your project root:
Traditional Hosting (cPanel, FTP)
For traditional web hosting providers:Via FTP
Step 1: Prepare Files
Step 1: Prepare Files
Ensure your project structure is ready:
Step 2: Connect via FTP
Step 2: Connect via FTP
Use an FTP client like FileZilla:
- Host: ftp.yourdomain.com
- Username: Your FTP username
- Password: Your FTP password
- Port: 21 (or 22 for SFTP)
Step 3: Upload Files
Step 3: Upload Files
- Navigate to
public_htmlorwwwdirectory - Upload all project files
- Maintain the same folder structure
- Ensure permissions are set correctly (755 for directories, 644 for files)
Via cPanel File Manager
- Log in to cPanel
- Open File Manager
- Navigate to
public_html - Click Upload
- Upload a ZIP file of your project
- Extract the ZIP file
- Move files from subfolder to
public_htmlif needed
Apache Configuration
If using Apache server, create.htaccess file in root directory:
Performance Optimization
Image Optimization
Before deployment, optimize images:Minification
Minify CSS and JavaScript:Monitoring & Analytics
Google Analytics
Add tracking code to all pages (before</head>):
Uptime Monitoring
Recommended tools:- UptimeRobot - Free uptime monitoring
- Pingdom - Performance monitoring
- StatusCake - Uptime and performance
Comparison Table
| Feature | GitHub Pages | Netlify | Vercel | Traditional Hosting |
|---|---|---|---|---|
| Free Tier | Yes | Yes (100GB/mo) | Yes (100GB/mo) | Varies |
| Custom Domain | Yes | Yes | Yes | Yes |
| SSL Certificate | Automatic | Automatic | Automatic | Manual/Paid |
| Deployment | Git push | Git/Drag & Drop | Git/CLI | FTP/cPanel |
| Build Time | ~1-2 min | Instant | Instant | Manual |
| CDN | Yes | Yes | Yes | Usually No |
| Redirects | Limited | Yes | Yes | Via .htaccess |
| Forms | No | Yes | No | Server-side needed |
| Best For | Simple projects | Full-featured sites | Next-gen performance | Full control |
Troubleshooting
404 Errors After Deployment
Problem: Pages return 404 errors. Solution:- Check file paths are lowercase and match exactly
- Verify
.htmlextensions are included in links - Add redirect rules (see platform-specific config above)
Images Not Loading
Problem: Images don’t display after deployment. Solution:- Use relative paths:
./images/logo.pnginstead of/images/logo.png - Verify image files were uploaded
- Check file permissions (644 for files)
CSS Not Applying
Problem: Styles don’t appear on live site. Solution:- Clear browser cache
- Check CSS file paths in HTML
- Verify CSS files were uploaded
- Check for MIME type issues (should be
text/css)
Next Steps
After successful deployment:- Test Thoroughly - Verify all functionality works in production
- Set Up Analytics - Monitor traffic and user behavior
- Configure Monitoring - Set up uptime alerts
- Optimize Performance - Run Lighthouse audits and improve scores
- Document Changes - Keep deployment notes for future updates
For government or official deployments, ensure compliance with security policies and accessibility standards (WCAG 2.1 Level AA).