Overview
Netlify is a modern hosting platform designed for static sites and frontend applications. It offers the easiest deployment experience with drag-and-drop functionality and instant previews.Netlify’s free tier includes 100GB bandwidth/month, 300 build minutes/month, and automatic SSL certificates.
Prerequisites
- Your portfolio template folder ready to deploy
- An email address to create a Netlify account
- (Optional) A GitHub account for Git-based deployments
Method 1: Drag-and-Drop Deployment (Fastest)
1
Sign Up for Netlify
- Go to netlify.com
- Click Sign Up in the top-right corner
- Choose to sign up with:
- GitHub (recommended if you use GitHub)
- GitLab
- Bitbucket
- Complete the registration process
- Verify your email if required
2
Prepare Your Portfolio Folder
- Locate your portfolio template folder on your computer
- Ensure
index.htmlis at the root level of the folder - Verify all assets (CSS, JavaScript, images) are included
- Test locally one more time to confirm everything works
3
Deploy via Drag-and-Drop
- Log in to your Netlify dashboard
- Look for the drag-and-drop area on the main page
- If you don’t see it, click Add new site > Deploy manually
- Drag your entire portfolio folder into the drop zone
- Wait for upload to complete (usually 10-30 seconds)
Netlify automatically detects it’s a static site and configures everything for you.
4
Access Your Live Portfolio
- Once deployment completes, Netlify generates a random URL like:
- Click the URL to view your live portfolio
- Your site is now live and accessible worldwide
5
Customize Your Site Name (Optional)
- In your site dashboard, click Site settings
- Under Site information, click Change site name
- Enter a custom name (e.g.,
john-doe-portfolio) - Your new URL will be:
https://john-doe-portfolio.netlify.app
Method 2: Deploy from GitHub Repository
1
Push Your Portfolio to GitHub
- Create a new GitHub repository
- Upload your portfolio files to the repository
- Ensure
index.htmlis at the root level
2
Connect Netlify to GitHub
- In your Netlify dashboard, click Add new site
- Select Import an existing project
- Choose Deploy with GitHub
- Authorize Netlify to access your GitHub account
- Select your portfolio repository from the list
3
Configure Build Settings
Since this is a static HTML site with no build process:
- Build command: Leave empty
- Publish directory: Leave as root (
/) or enter. - Branch to deploy:
main(ormaster)
For static sites, you don’t need any build commands or special configuration.
4
Automatic Deployments
Netlify now watches your GitHub repository. Every time you push changes:
- Netlify automatically detects the push
- Triggers a new deployment
- Updates your live site in seconds
Updating Your Portfolio
For Drag-and-Drop Deployments
1
Make Local Changes
Edit your HTML, CSS, or JavaScript files locally.
2
Redeploy
- Go to your site dashboard on Netlify
- Click Deploys tab
- Scroll to the drag-and-drop area
- Drag your updated folder to deploy a new version
For Git-Based Deployments
1
Push Changes to GitHub
2
Automatic Deployment
Netlify automatically deploys your changes. Watch the Deploys tab for progress.
Custom Domain and SSL Setup
1
Add Your Custom Domain
- In your site dashboard, click Domain settings
- Click Add custom domain
- Enter your domain name (e.g.,
www.johndoe.com) - Click Verify and then Add domain
You can add multiple domains (e.g., both
example.com and www.example.com).2
Configure DNS
Netlify provides DNS configuration instructions:Option A: Use Netlify DNS (Recommended)
- Click Set up Netlify DNS
- Follow instructions to update nameservers at your registrar
- Netlify handles all DNS configuration automatically
- Add these records at your DNS provider:
- For apex domain:
3
Enable HTTPS (Automatic)
- Once DNS is configured, Netlify automatically provisions an SSL certificate
- This takes a few minutes to an hour
- Your site will be accessible via
https://
4
Configure HTTPS Settings
In Domain settings > HTTPS:
- Enable Force HTTPS (redirects HTTP to HTTPS)
- Certificate is automatically renewed every 90 days
Environment Variables (If Needed)
If your portfolio uses any environment variables (like API keys):1
Access Environment Variables
- Go to Site settings > Environment variables
- Click Add a variable
2
Add Variables
- Key: Variable name (e.g.,
API_KEY) - Values: Different values for production/preview
- Scopes: Choose when to use this variable
3
Access in JavaScript
For client-side JavaScript, you’ll need to inject these at build time. For most static portfolios, this isn’t necessary.
Advanced Features
Form Handling
Netlify can handle form submissions without server-side code:Deploy Previews
For Git-based deployments:- Every pull request gets a unique preview URL
- Test changes before merging to production
- Share preview links with clients or collaborators
Redirects and Rewrites
Create a_redirects file in your portfolio root:
Troubleshooting
Site not loading
Site not loading
- Check that
index.htmlis at the root of your deploy folder - Review deploy logs in the Deploys tab
- Ensure publish directory is set correctly (usually
/or.)
Assets not loading (CSS/JS/Images)
Assets not loading (CSS/JS/Images)
- Use relative paths:
./css/style.cssinstead of/css/style.css - Check file names are spelled correctly (case-sensitive)
- Verify files were included in the deployment
Custom domain not working
Custom domain not working
- Wait 24-48 hours for DNS propagation
- Verify DNS records are configured correctly
- Check domain settings in Netlify dashboard
- Use DNS Checker to verify propagation
SSL certificate not provisioning
SSL certificate not provisioning
- Ensure DNS is fully propagated
- Check that CAA records (if any) allow Let’s Encrypt
- Wait up to an hour for initial certificate provisioning
Best Practices
Netlify’s free tier is generous and suitable for most personal portfolios. Upgrade only if you need additional bandwidth or features.
Next Steps
Form Handling
Add a contact form to your portfolio using Netlify Forms.
Netlify Functions
Add serverless functions for dynamic functionality.