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
Antihost offers managed WordPress hosting with free migration, one-click staging and a 14-day free trial.
To move a WordPress site from a subdomain such as blog.example.net to its own domain such as example.com on Ubuntu, change three layers in order: DNS, the Ubuntu web-server virtual host, and WordPress’s canonical URLs. Then issue a certificate for the new hostname and test the old and new addresses before retiring the subdomain.
The safest sequence is: make the new domain resolve to the server, configure Apache or nginx to answer for that hostname, update WordPress Address and Site Address (or map the domain to a Multisite subsite), enable HTTPS, and verify administration, assets, redirects, and login cookies.
Free tools Windows power users keep installed
One-click scans. No signup required.
What actually changes when a WordPress subdomain gets its own domain
A browser request reaches your server through several independent decisions. DNS decides which IP address answers for the destination domain. Apache or nginx then chooses a virtual host (Apache) or server block (nginx) by matching the HTTP Host header. WordPress finally decides which hostname is canonical by reading its URL settings and generating links, cookies, redirects, and asset URLs.
Changing only one layer produces familiar failures: the new domain may show the wrong site, WordPress may redirect back to the subdomain, HTTPS may fail, or the page may load with missing styles and images. Treat the migration as a coordinated configuration change rather than a single WordPress setting.
#1 Best Overall
- 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: 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.
- Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
Before you start: prerequisites and a safe plan
- Administrative access to the Ubuntu server and the account that manages DNS for the destination domain.
- A registered destination domain, for example
example.com, and a decision about whether visitors will also usewww.example.com. - The WordPress document-root path and the web server in use. On Ubuntu this is commonly Apache or nginx, but do not assume: inspect the running service before editing files.
- A current database and file backup. URL changes affect serialized settings, redirects, login cookies, and cached pages; a backup gives you a way to restore the previous address.
- A maintenance window or a way to prevent content changes while you update URLs and clear caches.
Keep the old subdomain online until the new host has passed your checks. It is useful for rollback and for redirecting existing links after the migration is confirmed.
1. Point DNS at the Ubuntu server
Create an A record for the new domain that contains the server’s public IPv4 address. If the server has IPv6, add an AAAA record as well. Create equivalent records for www if that hostname will be accepted by the site. An alias such as CNAME www example.com can be used where your DNS provider supports it, but the apex domain itself normally uses an A or AAAA record.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesUbuntu’s TLS documentation requires a registered domain with DNS records pointing to the server before a certificate can be issued. The hostname must also be publicly resolvable for the HTTP challenge used by common certificate tools. DNS propagation time depends on the records’ TTL and the provider; do not request a certificate until public resolvers return the intended address.
Check from a machine outside the server’s network:
dig +short example.com A
dig +short example.com AAAA
dig +short www.example.com A
Each result should be an address assigned to the Ubuntu host. If you are testing before public DNS is ready, an entry in a client’s /etc/hosts file can map the hostname temporarily, but that affects only that client and does not satisfy public certificate validation.
2. Identify and prepare the web server
Find which service is listening on ports 80 and 443 before changing configuration:
Rank #2
- 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
sudo ss -ltnp | grep -E ':80|:443'
sudo systemctl status apache2
sudo systemctl status nginx
Use the procedure for the service that actually serves the WordPress files. Do not create an Apache site file for an nginx installation, or vice versa. In either case, the new hostname must be unique among all sites on the server; otherwise the first or default virtual host may answer.
Apache configuration
Create a dedicated virtual host
Ubuntu’s Apache layout stores available site definitions in /etc/apache2/sites-available/. Create a file such as /etc/apache2/sites-available/new-domain.conf and replace the example values with your domain and WordPress path:
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/wordpress
<Directory /var/www/wordpress>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/example-error.log
CustomLog ${APACHE_LOG_DIR}/example-access.log combined
</VirtualHost>
ServerName is the hostname Apache uses to match this virtual host. The DocumentRoot must be the directory containing wp-admin, wp-content, and wp-includes. The directory block grants access and permits WordPress’s .htaccess rewrite rules; if your server deliberately uses a different rewrite policy, preserve that policy rather than enabling overrides blindly.
Enable the site and rewrite support
- Enable the new definition:
sudo a2ensite new-domain.conf - Enable URL rewriting if it is not already enabled:
sudo a2enmod rewrite - Check the complete Apache configuration:
sudo apache2ctl configtestThe expected result is
Syntax OK. - Reload without stopping active connections:
sudo service apache2 reload
If an unwanted default site is catching requests with an unrecognized host, disable it only after confirming that no other application depends on it:
sudo a2dissite 000-default.conf
sudo apache2ctl configtest
sudo service apache2 reload
Ubuntu’s Apache guidance notes that the hostname must be mapped to the machine, either through DNS or a client-side /etc/hosts entry. Once DNS is live, test the new host directly so Apache’s name-based matching can be verified.
nginx configuration
Create a server block
nginx uses files in /etc/nginx/sites-available/ and enabled links in /etc/nginx/sites-enabled/. Create /etc/nginx/sites-available/example.com with a server block suited to the installed PHP-FPM version. This example assumes the WordPress files are in /var/www/wordpress and that the PHP socket path is known on your system:
Rank #3
- 【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.
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
root /var/www/wordpress;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ .php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
}
location ~* /.ht {
deny all;
}
}
Change php8.2-fpm.sock to the socket provided by your installed PHP-FPM package. A wrong socket path causes PHP requests to return a gateway error even though static files still load. Confirm the path under /run/php/ and use the version that is actually running.
Enable and validate the block
- Create the symbolic link:
sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/example.com - Test nginx syntax:
sudo nginx -t - Reload nginx after a successful test:
sudo systemctl reload nginx
Each nginx site needs a unique server_name. Ubuntu’s multi-site pattern commonly uses one HTTP block that redirects to HTTPS and a second TLS block, although Certbot can add or adjust those blocks after the certificate request.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minute3. Change WordPress’s canonical URL
Normal single-site installation
Sign in to the existing WordPress dashboard while the old address still works. Go to Settings → General. Change both fields to the destination URL:
- WordPress Address (URL) is where the WordPress core files are located.
- Site Address (URL) is the public address visitors use.
Use the same scheme and hostname you intend to serve, such as https://example.com. Do not add a trailing slash to the value. Save the changes once; WordPress may immediately redirect the browser to the new host, so open a new tab before saving if you need to keep the old dashboard session available.
If the dashboard becomes inaccessible because the values were saved incorrectly, define the URLs temporarily in wp-config.php before the line that says to stop editing:
define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );
These constants override the database values while present. Use them to regain access, correct the settings, and then remove them if you want the URLs managed from the dashboard.
Rank #4
- 【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.
Replace old URLs in content and configuration
Changing the two General Settings fields does not rewrite every old link stored in posts, widgets, menus, theme options, or plugin settings. Search the database for the old subdomain and replace it with the new host using a WordPress-aware tool that understands serialized data. A plain SQL string replacement can corrupt serialized option lengths and break settings.
After the replacement, purge page-cache, object-cache, and CDN entries. Inspect the page source and browser developer tools for requests still going to the subdomain. Update hard-coded URLs in theme files, custom CSS, JavaScript, feeds, XML sitemaps, and any external service that calls a webhook or REST endpoint.
4. Obtain and enforce HTTPS
Request a certificate only after public DNS resolves every hostname that users will visit. Ubuntu documents Certbot commands for both supported web servers. For Apache:
sudo certbot --apache -d example.com -d www.example.com
For nginx:
sudo certbot --nginx -d example.com -d www.example.com
Include only hostnames that resolve to this server and that you intend to serve. Certbot’s web-server plugins can edit the configuration and reload the service after successful issuance; they also set up renewal automation. Confirm renewal configuration with your distribution’s Certbot documentation and perform a dry run where supported.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Choose one canonical HTTPS hostname. If both the apex and www names are valid, redirect the non-canonical one with a single 301 hop. Avoid adding a separate application-level redirect that duplicates the web-server redirect, because competing rules make loops harder to diagnose.
5. Test the migration before retiring the subdomain
Run these checks from a normal browser and, where useful, from the command line. Keep the old site and its DNS record available until all checks pass.
Best Value
- 【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: confirm that
example.comand anywwwname return the intended server address from an external resolver. - Virtual-host selection: request the new hostname and verify that the expected site, not another application or the default host, responds. Review Apache access logs or nginx logs if the response is unexpected.
- HTTP behavior: open
http://example.comand confirm one deliberate redirect to the chosen HTTPS URL. - TLS: open the HTTPS address, inspect the certificate, and check that it covers every hostname users can enter.
- WordPress front end: test the home page, several posts, categories, search, feeds, pagination, contact forms, and any custom post types.
- Administration: open
/wp-admin/, sign in, edit a draft, upload an image, and verify that the dashboard does not jump back to the old subdomain. - Assets: inspect CSS, JavaScript, images, fonts, and embedded media for old-host URLs or browser mixed-content warnings.
- Redirects: test an old subdomain URL and confirm it reaches the corresponding new URL without alternating between HTTP and HTTPS or between hosts.
- External integrations: check payment callbacks, webhooks, analytics settings, email links, social previews, and any API client that stored the old origin.
Use a header request to see the redirect chain:
curl -I http://example.com
curl -I https://example.com
curl -I https://blog.example.net/
A reverse-proxy deployment needs one additional check: WordPress must receive the correct HTTPS indication from the proxy. WordPress documents that a mismatch between the proxy’s SSL headers and WordPress’s perception of the request can create an infinite redirect loop. Ensure the proxy forwards the HTTPS header and that the application trusts it according to your deployment design.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Single site versus WordPress Multisite
Single site
A normal installation generally needs one web-server host definition, the two WordPress URL values, a certificate, and a controlled replacement of old URLs in content and caches. The site’s database and uploads remain in the same installation.
Recommended Free Tools
Multisite subsite
Multisite adds a domain-mapping layer because the site is part of a network. WordPress states that domain mapping is a native feature in WordPress 4.5 and later. Older Multisite versions required a domain-mapping plugin. Native support does not remove the DNS, virtual-host, URL, or certificate work: the mapped domain still has to resolve to the network’s server and be accepted by its web-server configuration.
In the network administration area, map the subsite currently reachable at an address such as subsite1.networkdomain.com to example.com, following the network’s domain-mapping settings. Do not change the network’s primary domain when you intend to move only one subsite. Review the mapped site’s scheme, home URL, and site URL after saving.
Multisite login failures often involve cookies rather than DNS. Check the cookie-domain and mapped-domain guidance in WordPress’s network configuration documentation, including any COOKIE_DOMAIN setting in wp-config.php. Test logging in, logging out, switching between network administration and the mapped site, and opening the site in a private browser window.
Common failures and precise fixes
| Symptom | Likely cause | What to check and fix |
|---|---|---|
| The wrong website appears | DNS points elsewhere, or the request matches a default virtual host. | Verify external DNS answers, the Apache ServerName or nginx server_name, the enabled-site link, and the order or default status of other hosts. Reload after correcting the configuration. |
| Apache refuses to reload | Syntax error, invalid path, or a conflicting directive. | Run sudo apache2ctl configtest, read the reported file and line, correct it, and test again before reloading. |
| nginx returns a 502 error for PHP | The PHP-FPM socket in fastcgi_pass does not exist or its service is stopped. |
List /run/php/, use the running PHP-FPM socket, check its systemd status, run sudo nginx -t, and reload. |
| Certificate issuance fails | DNS has not propagated, the hostname is not publicly reachable, or a requested name is missing from DNS. | Wait for public resolution, test port 80 from outside the server, and request a certificate covering each hostname visitors will use. |
| Browser reports an infinite redirect | WordPress URL values, duplicate HTTP/HTTPS rules, or reverse-proxy HTTPS headers disagree. | Inspect the redirect chain with curl -I, make the WordPress scheme match the canonical URL, remove duplicate redirects, and correct proxy SSL forwarding. |
| Styles or images are missing | Content still references the old host, or cached pages contain stale URLs. | Perform a serialized-data-safe database replacement, inspect theme and plugin settings, regenerate caches, and check the browser console for mixed-content errors. |
| Multisite users cannot log in | Mapped-domain cookies do not match the host being used. | Review the network’s cookie-domain and mapped-domain settings, remove stale cookies, and retest in a private window. |
When to remove or redirect the old subdomain
Do not delete the old virtual host immediately after the new address works. First export a list of important old URLs and test their redirects. Configure a permanent redirect from the old subdomain to the equivalent path on the new domain, not merely to the new home page. Preserve query strings where applications need them, and monitor logs for unexpected 404 responses.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
After search engines, external integrations, and users have had time to adopt the new address, you can remove the old site definition and DNS record. Keep the database and file backup from before the change, and document the final canonical hostname, certificate names, DNS records, and web-server file so the configuration can be recreated during a later server move.
Quick Recap
Apache and nginx at a glance
| Task | Apache | nginx |
|---|---|---|
| Configuration location | /etc/apache2/sites-available/ |
/etc/nginx/sites-available/ |
| Hostname directive | ServerName (plus optional ServerAlias) |
server_name |
| Enable site | sudo a2ensite new-domain.conf |
Symbolic link into /etc/nginx/sites-enabled/ |
| WordPress routing | Usually .htaccess with mod_rewrite and AllowOverride All |
try_files fallback to index.php |
| PHP handling | Distribution-specific Apache PHP module or PHP-FPM proxy | PHP-FPM socket or upstream configured with fastcgi_pass |
| Configuration test | sudo apache2ctl configtest |
sudo nginx -t |
| Reload | sudo service apache2 reload |
sudo systemctl reload nginx |
| Certbot integration | sudo certbot --apache ... can edit Apache and reload it |
sudo certbot --nginx ... can edit nginx and reload it |
Final decision checklist
- The destination domain and every intended alias resolve to the Ubuntu server.
- Apache’s
ServerNameor nginx’sserver_namematches the requested host. - The site definition passes its configuration test and has been reloaded.
- WordPress Address and Site Address use the chosen HTTPS hostname, or the Multisite subsite has been mapped to it.
- A certificate covers the apex and any
wwwhostname that users can visit. - Old-host URLs have been replaced safely, caches cleared, and assets checked for mixed content.
- Administration, login cookies, redirects, forms, integrations, and representative content work on the new domain.
- The old subdomain remains available for intentional redirects until the migration is stable.
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.

