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.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)
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
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
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)
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
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
Push Your Portfolio to GitHub
- Create a new GitHub repository
- Upload your portfolio files to the repository
- Ensure
index.htmlis at the root level
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
Configure Build Settings
- Build command: Leave empty
- Publish directory: Leave as root (
/) or enter. - Branch to deploy:
main(ormaster)
Automatic Deployments
- Netlify automatically detects the push
- Triggers a new deployment
- Updates your live site in seconds
Updating Your Portfolio
For Drag-and-Drop Deployments
Make Local Changes
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
Push Changes to GitHub
Automatic Deployment
Custom Domain and SSL Setup
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
example.com and www.example.com).Configure DNS
- 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:
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://
Configure HTTPS Settings
- 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):Access Environment Variables
- Go to Site settings > Environment variables
- Click Add a variable
Add Variables
- Key: Variable name (e.g.,
API_KEY) - Values: Different values for production/preview
- Scopes: Choose when to use this variable
Access in JavaScript
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