Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

DNS cannot point to a folder. DNS only directs a hostname to an IP address or another hostname. To make newdomain.example serve files from an existing subfolder, first point its A, AAAA, or CNAME record to the server or proxy that receives the traffic, then configure that server. Set the domain’s document root to the subfolder if the browser should keep showing the new domain. Use an HTTP redirect if visitors should end up at a complete URL such as https://example.com/subfolder; that option changes the address in the browser.

What “point a domain to a subfolder” actually means

A domain name and a website path are handled at different layers. DNS answers a question such as “Which server handles newdomain.example?” It has no field for /blog, /store, or any other URL path. The web server, hosting panel, proxy, or application must decide which files or upstream service handles the request after DNS has delivered it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For example, suppose the existing site stores a section at /home/account/public_html/projects and you want newdomain.example to open that section. There are three valid designs:

  • Document-root mapping: configure newdomain.example with that subfolder as its document root. The visitor continues to see newdomain.example in the address bar.
  • HTTP redirect: make the new domain return a redirect to https://example.com/projects. The browser changes to the destination URL.
  • Reverse proxy or application routing: send requests for the new host to a front server that routes them to an application or upstream service representing the subfolder. DNS still carries no path information.

The right choice depends on whether the application works under a different hostname, whether the content is on the same origin, who handles HTTPS, and how much control you have over rewrites and redirects.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Choose the implementation before changing DNS

Method Browser URL Where the path is configured Best fit Important limitation
Document-root mapping Stays on the new domain Hosting panel or virtual-host/web-server configuration A separate domain should serve an existing directory directly The application must tolerate the new hostname and base URL
HTTP redirect Changes to the full target URL Registrar, hosting forwarding tool, or proxy redirect rule The original site should remain canonical It is not a second site; every request is sent elsewhere
Reverse proxy or application routing Usually stays on the requested host Front-end server and application/router The content is on another service, container, or origin Requires correct Host, HTTPS, cookies, and upstream routing

Prepare the domain, hosting, and DNS

Complete these checks before editing a record:

  • Confirm that the domain is registered and that you can edit its DNS zone.
  • Identify the IPv4 address, IPv6 address, or provider hostname that should receive requests.
  • Confirm that your hosting account or virtual-host configuration accepts the domain. A DNS record by itself does not create a site, directory, or document root.
  • Locate the existing subfolder and verify that it contains the intended index file or application entry point.
  • Decide whether both the apex name, such as example.com, and www.example.com should work. Choose one canonical hostname and redirect the other consistently.
  • Decide who terminates TLS. With direct DNS, the origin server needs a certificate covering the new domain. With a proxy, the proxy may handle the visitor-facing certificate, while the origin still needs the certificate required by the selected origin-connection mode.
  • Check whether mail, verification records, or other services use the same DNS zone. Changing a web record should not remove MX, TXT, or service records that must remain with another provider.

Method 1: map the domain’s document root to the subfolder

This is the method to use when the new domain should display the subfolder while retaining the new domain in the address bar. A web server normally serves files from each domain’s document root—the directory assigned to that virtual host. cPanel describes the default behavior this way: “By default, a domain’s web server … returns files from the domain’s directory (the document root).”

Generic hosting-panel procedure

  1. Open the hosting panel’s domain-management area. The control may be named Add-on Domain, Domain Alias, Additional Domain, or Virtual Host.
  2. Add the domain and, when prompted, set its document root to the existing subfolder. Enter the directory path exactly as the host expects; do not append a URL scheme or a leading domain name.
  3. Save the virtual-host configuration. Some hosts create a new empty directory automatically; replace that default with the intended existing folder only if the panel permits it and you have confirmed the path.
  4. Create the DNS record that points the domain to this hosting account: an A record for an IPv4 address, an AAAA record for IPv6, or a CNAME when the provider supplies a hostname.
  5. Install or request a certificate for the new hostname, then test HTTPS. If both apex and www are enabled, cover both names or redirect one to the other.
  6. Open the new domain in a private browser window and test a home page, a deep link, a form, a logged-in session, and a static asset before directing users to it.

cPanel and WHM

In cPanel, use the domain-management interface to add the domain and specify its document root. The exact labels vary by cPanel version and account permissions. If you instead want forwarding, use cPanel’s forwarding interface rather than assigning a document root. cPanel notes that a forwarding domain must have its A record pointed at the forwarder’s IP address; adding a forwarding rule without that DNS relationship will not receive visitors.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

WHM administrators can create or edit the corresponding virtual host when account-level controls are insufficient. Verify the generated document-root path and the host’s SSL configuration instead of assuming that a domain alias will automatically serve the desired subfolder.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Make the application aware of its new hostname

Serving the right files is only the first test. Applications often store an absolute site URL, generate canonical tags, set cookie domains, build asset URLs, or apply rewrite rules based on the original hostname and path. Review these items in the application’s own settings:

  • Base URL, site URL, and environment variables used to generate links.
  • Canonical tags, Open Graph URLs, sitemap entries, and robots directives.
  • Relative versus absolute links to CSS, JavaScript, images, downloads, and API endpoints.
  • Cookie domain and path attributes, especially for authentication and administration sessions.
  • Rewrite rules that assume the application is below /subfolder or only at the original host.
  • Framework base-path or trusted-host settings, plus allowed-origin lists for APIs and browser requests.

If the application is designed to be single-host, a document-root mapping may produce broken links or redirect back to the old URL. In that case, use a redirect or configure the application/router to support the additional host deliberately.

Method 2: redirect the domain to a full subfolder URL

Choose a redirect when the original site and its subfolder should remain the canonical location. A redirect response tells the browser to request another URL, so the address bar changes to the destination.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Configure forwarding

  1. Decide on the exact destination, including https://, hostname, path, and any required trailing-slash convention.
  2. In the registrar, hosting panel, or proxy, open the feature named URL Redirect, Domain Forwarding, or similar.
  3. Enter the complete destination URL, not just a folder name. Select the provider’s temporary option while testing or when the arrangement may change; select a permanent redirect only when the move is intended to be durable.
  4. Make sure the source domain resolves to the forwarding service. A forwarding rule at a provider cannot run if the source hostname’s DNS points somewhere else.
  5. Test the bare domain, www variant, HTTP, HTTPS, a path with a query string, and a nonexistent path. Confirm that the redirect target is correct and that no loop occurs.

Cloudflare proxy considerations

Cloudflare separates DNS resolution, TLS, and redirect processing. For an alias-domain redirect, Cloudflare requires a DNS record that resolves through its proxy before the redirect is applied. Create the appropriate A, AAAA, or CNAME record, deliberately choose the proxy status, and then create the redirect rule for the desired path or destination. If the record is not proxied and traffic goes directly to the origin, the origin must provide the redirect and the certificate.

Do not confuse a DNS-only record with a redirect. DNS can deliver the request to a server, but only an HTTP-capable service can return a 301, 302, or another redirect response.

Method 3: use a reverse proxy or application route

A reverse proxy is appropriate when the domain should stay visible but the content is served by a different application, container, or origin. Point DNS at the front server, then create a host-based route that sends requests for the new domain to the upstream service. The upstream may expose the equivalent of a subfolder even though it runs at a separate internal address.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

This design requires more than a DNS change. Configure the front server and application to handle:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • The incoming Host header and the hostnames accepted by the application.
  • TLS termination at the proxy and, if applicable, certificate validation on the proxy-to-origin connection.
  • Forwarded scheme and client-IP headers so the application knows whether the original request was HTTPS.
  • Cookie domain/path rewriting when cookies were created for the upstream hostname or a different path.
  • WebSocket, upload, timeout, and request-body settings required by the application.
  • Absolute URLs, redirects, canonical tags, and security policies generated by the upstream.

Use this route when you control the front server or the provider exposes reverse-proxy and rewrite controls. If you only control DNS, this option is not available.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

DNS records: what to create and what not to expect

Record Use it when Value to obtain from
A The origin has an IPv4 address Your hosting provider or server administrator
AAAA The origin has an IPv6 address Your hosting provider or server administrator
CNAME A platform gives you a hostname instead of a fixed address The hosting, proxy, or application provider

Create only the records needed for the design. An old AAAA record can send IPv6 visitors to a different server even when the A record is correct. An existing CNAME or conflicting record can prevent the intended destination from being used. Check the apex and www names independently; they are separate hostnames and may currently point to different services.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

DNS answers where a request goes. It does not add the domain to a hosting account, create a virtual host, select a document root, install a certificate, or append /subfolder to a URL.

HTTPS and canonical-hostname setup

HTTPS must match the hostname that visitors enter. If traffic goes directly to the origin, install a certificate covering that domain on the origin server. If a proxy terminates visitor TLS, configure the proxy’s certificate and select an origin mode that matches the certificate and protocol available between proxy and server.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Cloudflare summarizes the separation clearly: “While DNS is what communicates where your website or application can be reached, SSL/TLS is what enables websites and applications to establish connections in a secure way.” A valid DNS answer therefore does not prove that HTTPS will work.

Choose one canonical form—such as the apex or www hostname—and make every alternate form redirect to it. Apply the choice consistently to internal links, canonical tags, sitemap URLs, cookies, and application settings. Test both HTTP-to-HTTPS and alternate-host redirects for loops before publishing the address.

Test the mapping without breaking the existing site

  1. Verify that the DNS record targets the intended server or proxy and that no obsolete A, AAAA, or CNAME record remains.
  2. Confirm that the hosting account lists the domain and the document root or forwarding rule is the one you selected.
  3. Request the domain over HTTP and HTTPS. Check the certificate name, response status, and final URL.
  4. Open the home page and several deep links. A home page that loads while every nested route returns a 404 usually indicates a rewrite or application-base-path problem.
  5. Inspect page source and browser developer tools for assets, API calls, mixed-content warnings, and redirects to the old hostname.
  6. Test login, logout, forms, file uploads, search, and any checkout or administrative workflow that uses cookies or sessions.
  7. Check canonical tags, sitemap URLs, robots directives, and generated absolute links for the intended hostname.
  8. Repeat the tests for the apex and www variants if both are configured, then document which one is canonical.

Troubleshooting common failures

Symptom Likely cause What to check
The old site or a provider parking page appears DNS points elsewhere, or the domain is not attached to the hosting account Compare A, AAAA, and CNAME records with the host’s values; verify the domain exists in domain or virtual-host management.
The server responds with the wrong site The request reached the server, but no matching virtual host or alias exists Check the exact hostname spelling, domain assignment, and document-root selection.
The home page works but links return 404 Rewrite rules or application base-path settings still assume the original location Review front-controller rules, route prefixes, and generated URLs for the new host.
The browser keeps changing back to the old domain The application’s canonical URL or forced redirect still names the old host Update the application URL and redirect rules, or use a deliberate redirect design instead of document-root mapping.
Assets or API calls fail under HTTPS Absolute HTTP URLs, a different hostname, or an incomplete allowed-origin list Inspect network requests, security-policy settings, and application environment variables.
Users are logged out or cookies are missing Cookie domain/path does not cover the new hostname or route Inspect the Set-Cookie attributes and configure the application for the intended host and path.
The redirect rule never runs The source DNS does not reach the forwarding service, or a proxy requirement was not met Confirm the source record and, for a proxied provider rule, confirm that proxy status is enabled as required.
HTTPS shows a certificate warning The certificate does not include the entered hostname, or TLS is terminating at a different layer Check certificate names and the direct-versus-proxied TLS path.
Email stops working after the web change Mail records were overwritten or removed while editing the DNS zone Restore the required MX, TXT, and related service records; keep web and mail destinations separate.

Which option should you use?

  • Use document-root mapping when the new domain should be a working address for the same files and the application supports that hostname.
  • Use an HTTP redirect when the subfolder’s existing URL should remain canonical, when search and sharing should resolve to that address, or when the application cannot operate under a second host.
  • Use a reverse proxy or application route when the target is on another service or origin and you control the front server’s routing and TLS behavior.

Make the DNS change last, after the hosting or proxy configuration is ready. DNS directs traffic to the right machine; the document root, redirect rule, or application route determines what that machine does with the request.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.