How to Deploy Third-Party Web Pages to Subdirectories: A Complete Guide (Including SEO Optimization)
In simple terms: After generating a large number of web pages, to maximize SEO traffic, the brand (hello.com) needs to first place the web pages on the subdomain abc.hello.com, then use a reverse proxy to place the web pages on hello.com/abc
In current website content distribution and SEO strategy, deploying third-party generated webpages (such as Webflow, Framer, CapGo.ai, WordPress, etc.) to a subdirectory of the main site (rather than a subdomain) is a more advantageous approach. This article will systematically explain this process, from SEO-related pros and cons analysis to DNS configuration, CNAME and TXT Record settings, reverse proxy operations, and alternative solutions, helping you seamlessly integrate the process.
Table of Contents
- The Impact of Subdomains and Subdirectories on SEO
- Overview of Steps to Integrate Webflow or Capco Websites into Subdirectories
- DNS Settings: Introduction and Configuration of CNAME and TXT Records
- Implementing Subdirectory Deployment Using a Reverse Proxy
- Alternative Solution: Exporting HTML Files for Manual Upload
The Impact of Subdomains and Subdirectories on SEO
From a structural perspective:Subdomains (e.g., blog.example.com) are treated by search engines as “independent websites.”Subdirectories (e.g., example.com/blog) are treated as part of the main site.
Which is better for SEO?
Although Google has stated that there is little difference between subdomains and subdirectories in terms of ranking, extensive SEO practice has shown that using subdirectories makes it easier to inherit the main site's authority and trustworthiness, resulting in better ranking performance.✅ Recommended: Deploy pages generated by Webflow or CapGo.ai to a subdirectory of the main site (e.g., example.com/landing/).
Steps to integrate the website into a subdirectory
- Prepare the page: Complete the webpage design and publish it in Webflow or CapGo.ai.
- Obtain the page access URL: Record the URL after publishing in Webflow or CapGo.ai.
- Configure DNS: Connect Webflow or CapGo's domain name service to your domain name.
- Set up a reverse proxy: Point the subdirectory to Webflow or CapGo.ai content.
- (Optional) Download the HTML file and upload it to the main site server as a static resource deployment.
DNS settings: CNAME and TXT records
When connecting a third-party platform to your domain name, you first need to modify the DNS records. You can do this in your domain management platform (such as Cloudflare, Alibaba Cloud, Namecheap, etc.).
What is a CNAME Record?
A CNAME (Canonical Name) record is used to map a subdomain to another domain.Example: Point webflow.example.com to proxy-ssl.webflow.com.
What is a TXT Record?
A TXT record is used to store text information, typically for identity verification purposes, such as:Domain ownership verification (e.g., Google Search Console)SSL certificate application verificationEmail service SPF/DKIM verification🛠️ Practical Tip: Webflow typically requires you to add a CNAME and a TXT record to verify the domain and enable SSL.
Implementing Subdirectory Deployment via Reverse Proxy
What is a Reverse Proxy?
A reverse proxy refers to: the main server acting as an intermediary for client requests, forwarding the requests to the backend Webflow/CapGo website, and then returning the response to the user.
Example:
When a user accesses example.com/landing/:
- The request is sent to your main server (e.g., Nginx or Apache).
- The main server forwards the request to webflow.example.com via the reverse proxy.
- The returned webpage content is then “wrapped” under the /landing/ path and returned to the user.
Nginx configuration example:
location /landing/ {proxy_pass https://webflow.example.com/;proxy_set_header Host webflow.example.com;proxy_set_header X-Real-IP $remote_addr;}⚠️ Note on path handling: Ensure that static resources in subdirectories load properly (JS and CSS paths must be mapped consistently).
Alternative solution: Upload HTML files to the main site
If you do not want to use a reverse proxy, you can use another method:
- Export static web pages from Webflow/CapGo.ai:
This is typically a compressed package containing HTML, CSS, JS, images, and other files.
- Upload to the /landing/ directory on your main site server:
Use FTP, SCP, or the website's backend management system for upload.
Advantages:
Faster loading and more stable page performance.No need to configure a reverse proxy or worry about cross-domain issues.
Disadvantages:
Inconvenient for content updates; each modification requires re-exporting and re-uploading.Not suitable for dynamic content.
Summary and Best Practices
Solution | Advantages | Disadvantages | Recommended Scenarios |
Subdirectory + Reverse Proxy | Good SEO, automatic content updates | Complex configuration | Recommended as the first choice |
Subdomain Deployment | Simple configuration, supports native platform integration | Independent SEO weighting | Optional backup solution |
Static HTML Upload | Stable and fast, pure frontend deployment | Not suitable for frequent updates | Use when there are few pages |
🔚 Final reminder: If you prioritize optimal SEO performance and brand consistency, we recommend prioritizing the subdirectory + reverse proxy deployment method.