To permanently redirect a subdomain, return an HTTP 301 Moved Permanently response from an HTTP service that controls the subdomain. DNS by itself cannot issue a redirect: a CNAME only aliases one hostname to another and cannot inspect a URL path, return a status code, or send a Location header.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
You can implement the redirect with a forwarding feature in your DNS host, registrar, or hosting panel, or run a small web-server endpoint for the subdomain. Use a 301 when the move is permanent, test every relevant URL before publishing it, and use a 308 instead when POST requests must retain their method.
As an Amazon Associate I earn from qualifying purchases.
What a subdomain redirect actually does
When someone requests https://old.example.com, the browser first resolves the hostname through DNS. It then opens an HTTP or HTTPS connection to the resulting server. The redirect happens only after that server receives the request.
The server answers with a status such as 301 Moved Permanently and a Location header containing the destination, for example https://new.example.com/landing. The client then requests the destination URL. The original hostname therefore needs a functioning HTTP endpoint, even if that endpoint does nothing except redirect.
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
Why a CNAME cannot perform the redirect
A CNAME record says that one DNS name is an alias for another hostname. DNS returns names and addresses; it does not understand HTTP methods, URL paths, response headers, or status codes. Pointing old.example.com at new.example.com with a CNAME can make both names reach the same server, but it does not tell that server to send visitors elsewhere.
Because DNS has no concept of a URL, it cannot redirect to a path such as /guides/start, preserve or discard a path, or issue a 301. A forwarding product or a web server must make that decision at the HTTP layer.
Choose the implementation that fits your control needs
| Consideration | Provider forwarding | Your own web server |
|---|---|---|
| Setup effort | Low; configured in a provider panel or dashboard | Higher; requires a server and an HTTPS endpoint when HTTPS is used |
| Response headers and Cache-Control | Limited to the controls exposed by the provider | Full control over status, headers, and caching directives |
| Path behavior | Depends on the provider’s forwarding implementation | Can be defined with rewrite rules, including path preservation |
| HTTPS certificate responsibility | Depends on whether the provider provisions and serves a certificate for the subdomain | You manage the certificate and the virtual host that answers the subdomain |
| Verification | curl -I against the subdomain |
curl -I against the subdomain |
Use provider forwarding when you want the smallest operational footprint and the provider explicitly supports a permanent HTTP redirect. Use your own endpoint when you need predictable path rules, custom headers, or control over caching. Do not assume that a DNS dashboard’s ordinary record editor is a forwarding service; look for a feature labeled forwarding, URL redirect, or permanent redirect.
Decide what should happen to paths
A “subdomain to a specific URL” instruction can mean two different policies. Decide which one you need before configuring anything:
- Single destination: every request for the subdomain, including requests with different paths, goes to one exact URL such as
https://www.example.com/archive. - Path-preserving move: a request such as
old.example.com/newsbecomesnew.example.com/news. This requires a forwarding service that documents path handling or a server rule that captures and appends the path.
Provider interfaces differ on this point. Some expose a “forward path” or “wildcard” option; others redirect only the bare hostname. Treat the behavior as unverified until you test both the root URL and a representative path.
Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
Configure a permanent redirect with a provider
The exact labels vary by DNS host, registrar, and hosting panel, and provider-specific screens are not universal. The following sequence applies to a service that genuinely offers HTTP forwarding.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errors- Open the forwarding tool, not only the DNS-record editor. Select URL forwarding, web forwarding, or the equivalent feature for the source subdomain.
- Enter the complete source hostname. Use the subdomain, such as
old.example.com, rather than the parent domain unless you intend to redirect every host. - Select the permanent redirect type. Choose
301, “Permanent,” or the provider’s equivalent. Do not select a frame or masked forwarding mode; that can leave the original address visible instead of returning a normal redirect. - Enter the full destination URL. Include the scheme (
https://) and any required path. A destination that is only a hostname may not express the exact page you intend. - Set path handling deliberately. If the panel offers a preserve-path option, enable it only when the destination site has matching paths. Otherwise configure the service to send all requests to the one specified URL.
- Confirm HTTPS coverage. If visitors will request
https://old.example.com, the forwarding endpoint must complete TLS for that hostname before it can return a 301. Verify that the provider supplies the certificate or clearly documents how you attach one. - Save and publish the rule. Keep a record of the source, destination, redirect code, and path setting so a later administrator can distinguish the forwarding rule from ordinary DNS records.
Provider forwarding is complete only when the endpoint returns the expected HTTP response. A saved dashboard setting is not proof that the HTTPS hostname, root path, and deeper paths all behave correctly.
Run the redirect from a web server you control
An own-server implementation is useful when the provider has no forwarding feature or when you need exact rewrite and header behavior.
Point the subdomain at the redirect endpoint
Create the appropriate DNS record so the subdomain resolves to the server that will answer it. The server must have a virtual host or site configuration for the requested hostname. For HTTPS traffic, install and renew a certificate covering that subdomain; TLS negotiation happens before the server can send the HTTP 301.
Return a 301 and a Location header
Configure the virtual host to answer the request with status 301 and a Location header containing the destination URL. The response body is optional for normal clients, because browsers follow the header. Make sure the rule is attached to the intended subdomain and not accidentally to unrelated sites on the same server.
Recommended Free Tools
Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
Illustrative Apache rule
A commonly used Apache pattern is:
RewriteEngine On
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]
This pattern captures the requested path and appends it to the new host. For example, a request for old.example.com/help is sent to https://newdomain.com/help. It is an illustrative pattern rather than a guarantee for every Apache layout: place it in the correct virtual-host or directory context, check how your server handles leading slashes, and test the final URL before enabling it for all traffic.
If your requirement is one fixed destination regardless of the incoming path, use a rule that does not append the captured path. The important result is the generated response, not the particular configuration syntax: status 301, the intended Location value, and no redirect loop.
Other server software
Nginx and other HTTP servers can perform the same operation with a permanent-return directive or rewrite rule. The configuration vocabulary differs, so use the documentation for the exact server version and verify the live response with the testing procedure below. Do not substitute a DNS CNAME for the HTTP rule.
301 or 308: choose based on the request method
| Status | Permanent meaning | Method behavior | When it fits |
|---|---|---|---|
301 Moved Permanently |
Signals that the resource has a new permanent URI and that future references should use it | Clients are not required to keep the original method; many change a POST into a GET | Most ordinary page, asset, and GET-based subdomain moves |
308 Permanent Redirect |
Permanent redirect semantics | The user agent must not change the request method | When POST or another non-GET request can reach the subdomain and must arrive at the destination with its method intact |
For a read-only game landing page, documentation site, or retired blog, a 301 is usually the expected choice. If the old subdomain accepts form submissions, API calls, webhooks, or other POST requests, evaluate a 308 instead of assuming a 301 will preserve them.
Test before making the redirect permanent
Permanent responses can be cached heuristically. A browser or intermediary may retain a 301 even when you later change the rule, and clearing that cached response is difficult for visitors. Test the endpoint while you still have an easy recovery path, then publish the permanent status only after the destination and path policy are correct.
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
Check the root URL
curl -I https://old.example.com
The headers should show an HTTP 301 status and a Location header whose value exactly matches the intended destination. A response such as 200 OK means the server is serving content instead of redirecting; a missing Location value leaves the client without a target.
Check a representative path
curl -I https://old.example.com/example-path
Compare the returned Location with your chosen policy. It should be the one fixed URL for a single-destination rule, or the corresponding destination path for a path-preserving rule. Test several important legacy paths when the subdomain previously hosted content.
Check both schemes and host variants
- Request the HTTPS hostname if users are likely to type or follow HTTPS links.
- Request HTTP as well if it is still reachable, and confirm whether the provider or server handles it consistently.
- Test the exact hostname you configured; a rule for
old.example.comdoes not automatically cover another subdomain.
Test method-sensitive traffic
If the old endpoint accepted POST requests, test with a representative request in a safe environment and inspect whether the destination receives the intended method. A 301 may be followed as a GET by a client; choose 308 when preserving the method is required.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Troubleshoot common failures
The CNAME exists, but visitors stay on the old host
This is expected when DNS is the only change. Keep the DNS record if it points traffic to the correct server, but add an HTTP forwarding rule or server-side redirect that returns 301.
The browser reports a certificate error before redirecting
The request did not reach the HTTP redirect because TLS failed first. Install a certificate for the source subdomain or use a forwarding provider that serves one. Confirm coverage for the exact hostname, not merely the parent domain.
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
The response is 200 instead of 301
Another virtual host, an application route, or a provider’s ordinary hosting target may be answering the request. Inspect the server’s host configuration and ensure the forwarding rule is enabled for the source subdomain.
The destination repeats the redirect
A loop occurs when the source and destination rules point back to each other, or when the destination hostname is also caught by the source rule. Make the source and destination distinct in the configuration and test each hostname separately.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Paths land on the wrong page
The forwarding service may discard paths, or a rewrite rule may append one when you wanted a single fixed URL. Test the root and a non-root path, then change the provider’s path option or the server rule to match the intended policy.
A later change appears to have no effect
Check the live response with curl -I from a clean environment and account for cached 301 responses. Because permanent redirects can be stored heuristically, visitors may continue following the old Location value after you have corrected the server.
Quick Recap
Operational checklist
- Define whether every path maps to one URL or whether paths carry over.
- Use an HTTP forwarding feature or a web server; do not rely on DNS alone.
- Choose 301 for a permanent move when method preservation is not required.
- Choose 308 when POST or another non-GET method must remain unchanged.
- Ensure the source hostname has a working HTTPS certificate if HTTPS requests are expected.
- Confirm the response contains status 301 (or 308) and the correct Location header.
- Test the root URL, a representative path, and each scheme users may request.
- Check for loops, unintended path changes, and cached results before announcing the permanent move.
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.




