How to Export Your Draftly Website Code and Host It Anywhere
Modern website builders offer incredible speed and ease, but sometimes you need more control than an integrated hosting solution provides. If you're looking to export your Draftly website code to manage it on your own servers, integrate with a specific CI/CD pipeline, or simply for archival purposes, this guide is for you. We'll walk through the process of taking your beautifully designed, cinematic 3D website and making it portable, giving you complete ownership over its deployment.
Why Export Your Website Code?
Exporting your website's code offers a level of flexibility and control that can be crucial for specific projects or organizational requirements. While Draftly provides robust, high-performance hosting, having your code enables diverse deployment strategies.
!how to export your draftly website code and host it anywhere, tutorials
- Ultimate Control: You dictate the server environment, security configurations, and content delivery network (CDN) setup, ensuring it aligns perfectly with your infrastructure and compliance needs. This is particularly valuable for enterprises or agencies managing multiple client sites. Studies show that businesses leveraging custom hosting solutions can reduce operational overhead by up to 15% in the long run due to optimized resource allocation.
- Advanced Development Workflows: For developers or agencies, exporting allows integration into existing version control systems (like Git), enabling collaborative development, custom scripting, and more complex build processes. This bridges the gap between AI-driven design and traditional dev operations.
- Specific Hosting Requirements: You might have a preferred hosting provider, an existing server infrastructure, or a need to deploy to a specialized environment (e.g., an intranet, a government-compliant cloud). Exporting provides the freedom to choose.
- Performance Optimization: While Draftly sites are optimized for speed out-of-the-box, having the code allows for deeper, custom performance tweaks on your chosen hosting platform, potentially achieving even higher Draftly Site Speed Optimisation: Get a 90+ PageSpeed Score if you have specific server-side optimizations in mind.
- Archival and Portability: Keep a local copy of your website's source code for long-term archiving or easy migration between hosting providers without being locked into a single platform.
How to Export Your Draftly Website Code
Draftly is designed to generate clean, production-ready code that powers its immersive 3D experiences. The export feature packages all the necessary HTML, CSS, JavaScript, and assets into a downloadable archive. This process typically involves a few straightforward steps within your Draftly dashboard.
To export your Draftly website code, follow these instructions:
- Log in to your Draftly account: Access your main dashboard where all your projects are listed.
- Select the Website Project: Navigate to the specific website you wish to export. This will open the Draftly editor for that project.
- Access Site Settings: Look for a 'Settings' or 'Project Settings' icon, usually represented by a gear or cog, typically found in the left-hand sidebar or top navigation bar. Click on it.
- Locate the Export Option: Within the settings menu, you'll find various options like 'Domain', 'SEO', 'Analytics', etc. Search for an option clearly labeled 'Export Code', 'Download Site Files', or similar. This feature is often found under an 'Advanced' or 'Developer' section. For a deeper understanding of what to expect, refer to our guide on Exporting Custom Code From AI Website Builders: What to Expect.
- Initiate the Export: Click the 'Export' button. Draftly will then compile all your site's assets and code into a single, compressed `.zip` or `.tar.gz` file. This process usually takes a few moments, depending on the size and complexity of your website.
- Download the Archive: Once the compilation is complete, a download link will appear. Click it to save the website archive to your local computer.
Understanding the Exported Files
When you export your Draftly website code, the archive will contain a structured set of files and folders, designed for easy deployment. You'll typically find:
- `index.html`: The main entry point for your website, containing the core structure and references to other assets.
- `css/`: A directory holding all the stylesheets (`.css` files) that control your site's visual presentation, including custom styles and framework-generated styles.
- `js/`: A directory containing all JavaScript files (`.js`), which power interactive elements, animations, and the core logic of your 3D scroll experiences. This includes both Draftly's proprietary scripts and any custom code you might have added via the Draftly Advanced Content Blocks: Rich Text, Code, and Custom HTML feature.
- `assets/` or `images/`: Folders containing all your media assets, such as images, videos, 3D models, and fonts, optimized for web delivery.
- `_redirects` or `netlify.toml` (optional): Configuration files for static site hosts like Netlify, if your site uses specific redirects or headers.
Hosting Your Exported Draftly Website Anywhere
Once you have your website's code package, you have the freedom to host it on virtually any web server or static site hosting platform. The process generally involves uploading these files to your chosen host. Since Draftly generates static HTML, CSS, and JavaScript, your website is ideal for high-performance static site hosting solutions.
Here’s a general approach to hosting your exported Draftly website:
- Choose a Hosting Provider: Select a hosting service that fits your needs. Popular options include Netlify, Vercel, AWS S3, Google Cloud Storage, GitHub Pages, or any traditional web host with FTP access.
- Prepare Your Hosting Environment:
- Upload Your Website Files: Transfer the contents of your unzipped Draftly website archive to your chosen hosting environment. Ensure that `index.html` is in the root directory.
- Configure Your Domain (if applicable): If you're using a custom domain, update your domain's DNS records (A record, CNAME record) to point to your new hosting provider. Each provider will give you specific DNS values to use. For detailed guidance on connecting domains, refer to our article on How to Connect a Custom Domain to Your Draftly Site.
- Test Your Live Site: Once the files are uploaded and DNS propagates (which can take a few minutes to several hours), visit your domain or the provided hosting URL to ensure everything is functioning correctly. Check all pages, animations, and interactive elements.
Popular Hosting Options
The choice of hosting depends on your technical comfort, budget, and specific project needs. For static sites, the options are plentiful and often highly performant.
- Netlify/Vercel: Excellent for static sites, offering continuous deployment, automatic SSL, and CDN integration. They are developer-friendly and provide generous free tiers.
- AWS S3 with CloudFront: A highly scalable and cost-effective solution for static site hosting. S3 stores your files, and CloudFront acts as a global CDN for fast content delivery. This is a robust choice for high-traffic sites.
- GitHub Pages: A free, simple way to host static websites directly from a GitHub repository. Ideal for personal portfolios or open-source projects.
- Firebase Hosting: Google's hosting solution, offering fast and secure static hosting with a global CDN, SSL, and custom domain support.
- Traditional Web Hosts (e.g., Bluehost, HostGator, GoDaddy): If you already have shared hosting or a VPS, you can simply upload your files via FTP. While less optimized for static sites than specialized services, it's a viable option.



