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

If your domain displays Apache’s “It works” or Ubuntu default page instead of WordPress, Apache is reachable but is serving the wrong virtual host or the wrong DocumentRoot. The usual causes are a DNS record aimed at another server, a hostname that does not match ServerName/ServerAlias, a WordPress site configuration that is not enabled, or a virtual host still pointing at Apache’s default web directory.

Fix the routing before changing WordPress: verify the domain resolves to the intended server, point the active virtual host at the directory containing wp-admin, wp-includes, wp-content, and index.php, enable that configuration, reload Apache after a syntax check, and test with an explicit Host header.

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.

What the Apache default page is telling you

The default page is generated by Apache, not by WordPress. That confirms a network connection reached an Apache service, but it does not prove that Apache selected your WordPress site. Apache chooses a virtual host using the request’s IP address, port, and hostname. In name-based hosting, the hostname must match a ServerName or ServerAlias in a <VirtualHost> block. The selected block then maps the URL path under its DocumentRoot.

If no hostname matches, Apache serves the primary (default) virtual host for that address and port. The first name-based virtual host can therefore answer requests that do not carry the expected Host header. A correct WordPress installation in another directory remains invisible until its virtual host is selected.

#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter | 4Pack Type C Female to A Male Cable Converter for Apple Duo 17 16 15 14 Plus,iWatch Watch 12 11 10,iPad 9 8 Air,Airpods 5 4
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

This is why the page usually does not mean that WordPress was deleted. It means the request arrived at Apache’s fallback site, or at a site whose root is still the distribution’s default directory.

Quick diagnosis: match the symptom to the next check

What you see Most likely explanation Check next
Domain and raw server IP both show the default page The default virtual host is answering, or the WordPress site is not enabled. List enabled sites and virtual hosts; inspect DocumentRoot values.
Domain shows the default page, but an explicit Host header returns WordPress DNS, the browser URL, or an IPv4/IPv6 record is reaching a different endpoint. Compare the domain’s A and AAAA records with the server being tested.
Raw IP shows the default page while the domain shows WordPress Normal name-based hosting behavior: the IP request has no matching hostname. Use the domain for normal testing; do not treat the raw-IP result as a WordPress failure.
WordPress files exist, but the page is blank or returns a file-not-found error The selected root is close but not the directory containing the WordPress front controller, or another application error is involved. Confirm the exact directory containing index.php and review the vhost error log.
Default page disappears, then WordPress permalinks return 404 Virtual-host routing is fixed; Apache rewrite handling is now the separate problem. Check AllowOverride All, the rewrite module, and WordPress rewrite rules.

1. Verify the hostname and DNS target

Start with the URL you actually use. A browser request to www.example.com is different from a request to example.com, and both are different from a request to a numeric IP address. Make a note of the exact hostname, including whether it uses www.

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

Check both address families

Inspect the domain’s A record (IPv4) and AAAA record (IPv6). Each should lead to the server where the intended Apache configuration is installed. An old AAAA record can send IPv6-capable clients to another machine even when the A record is correct. Likewise, a recently changed DNS record may still be cached according to its TTL.

Compare DNS results with the server’s actual public addresses. Test the hostname, not only the IP, because Apache uses the HTTP Host header to choose a name-based virtual host. Visiting the IP commonly lands on the default site by design.

Test local development names

For a site that is not publicly delegated, add the test hostname and server address to the client’s hosts file. This gives the client a local name-to-address mapping without changing public DNS. Use the same hostname in the hosts entry, browser URL, Apache ServerName, and any ServerAlias you intend to support.

After changing a hosts file, clear the operating system or browser DNS cache if the old address continues to appear. Test from the same machine that contains the override; another device will still use normal DNS.

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

2. Locate the actual WordPress directory

Find the directory that contains all of the core markers: wp-admin, wp-includes, wp-content, and index.php. That exact directory is the normal WordPress DocumentRoot. Do not point Apache at the parent directory merely because it has a convenient name.

Rank #2
Sale
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter | USB C Dongle with 90W Max Power Delivery, 3×5Gbps USB A Data Ports, for MacBook, Dell, and More (Charger Not Included)
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

For example, if the files are in /var/www/example.com, use that path. If they are in /var/www/example.com/wordpress, decide whether visitors should use a /wordpress URL or whether the site should appear at the domain root. Those are different layouts and require different WordPress URL and rewrite arrangements.

Check the path for spelling, capitalization, and symbolic-link targets. Apache resolves URL paths beneath the selected root; it will not search neighboring directories for a second WordPress installation.

3. Create or correct the Apache virtual host

On a Debian- or Ubuntu-style Apache installation, create a site configuration such as /etc/apache2/sites-available/example.com.conf. Replace both the hostnames and filesystem path with your values:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/example.com

    <Directory /var/www/example.com>
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/example-error.log
    CustomLog ${APACHE_LOG_DIR}/example-access.log combined
</VirtualHost>

What each directive does

  • ServerName is the primary hostname Apache should recognize.
  • ServerAlias adds alternate names, such as the www form.
  • DocumentRoot must be the directory containing the WordPress files.
  • The Directory block grants access to that filesystem path and permits WordPress’s per-directory .htaccess rules.
  • ErrorLog and CustomLog make it possible to distinguish requests handled by this site from requests handled by the default site.

Keep the hostname and WordPress root consistent across every vhost that serves the site. A configuration for HTTP on port 80 and a separate configuration for HTTPS on port 443 can otherwise send visitors to different directories.

Configure HTTPS separately

For HTTPS, create or update the corresponding <VirtualHost *:443> block with the same ServerName, required aliases, and WordPress DocumentRoot, plus the certificate directives supplied by your certificate setup. A certificate can be valid while the HTTPS request still selects Apache’s default site, so verify virtual-host matching on port 443 as well as port 80.

4. Enable the site and reload Apache safely

On Debian and Ubuntu, enable the configuration, optionally disable the distribution’s default site if it is catching requests, validate the complete configuration, and then reload Apache:

sudo a2ensite example.com.conf
sudo a2dissite 000-default.conf
sudo apache2ctl configtest
sudo systemctl reload apache2

A successful syntax check normally reports Syntax OK. If it reports an error, do not reload until you correct the file and run the check again. A reload applies configuration without unnecessarily stopping the service.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Command names and service units differ on RHEL-family systems, source builds, containers, XAMPP, cPanel, and managed hosts. Use the equivalent site-enabling, configuration-test, and reload commands for that platform. The sequence remains the same: select the file, validate syntax, then reload.

Do not disable a site blindly

Disabling 000-default.conf is useful when it is the unwanted fallback, but first confirm that your intended site has a complete vhost for every protocol you use. If the WordPress site is not enabled, disabling the default site can replace a visible page with a connection or configuration error.

5. Prove which virtual host Apache is selecting

Use a request that supplies the intended hostname while connecting locally to Apache. From the server, or from a client that resolves the hostname to that server, run:

curl -I -H 'Host: example.com' http://127.0.0.1/

Then compare it with a request to the numeric address:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -I http://127.0.0.1/

If the first command returns WordPress headers or a WordPress redirect while the second returns the default page, Apache’s name-based routing is working. The remaining issue is usually DNS, an incorrect browser URL, or a missing alias. If both commands return the default page, inspect the enabled configuration and its DocumentRoot.

When testing HTTPS locally, preserve the hostname while connecting to the local address with a tool option appropriate to your certificate setup. The essential part of the test is that Apache receives the hostname intended for the TLS vhost; an HTTPS request that omits it can select a different site.

Inspect Apache’s vhost map

On Debian and Ubuntu, this command prints the addresses, ports, hostnames, and default ordering Apache loaded:

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray | Data transfer & Fast charging for MacBook, iPhone 17/16/15, iPad, Samsung Galaxy, Apple Watch
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
sudo apache2ctl -S

Look for your hostname under the expected port and confirm that the file path shown is the configuration you edited. If the hostname is absent, Apache did not load the site file or the name is spelled differently. If it appears under an unexpected address or port, correct the vhost declaration or the listener configuration before touching WordPress.

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

6. Use logs before changing WordPress

Review the access and error logs for the vhost you created, along with Apache’s main error log. The example configuration writes to:

${APACHE_LOG_DIR}/example-access.log
${APACHE_LOG_DIR}/example-error.log

A request recorded only in the default site’s access log confirms that the request never reached the WordPress vhost. That points back to DNS, the requested hostname, the vhost’s address/port, or site enablement. An entry in the WordPress vhost log means routing is working and the next error is likely at the filesystem, PHP, WordPress, or rewrite layer.

Read the error output immediately after one controlled request. This is more reliable than repeatedly editing WordPress settings and guessing which change mattered. Keep the request URL, response status, and log line together while troubleshooting.

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

7. Handle WordPress installed in a subdirectory

A subdirectory installation needs one deliberate URL design. Suppose the core files are in /var/www/example.com/wordpress.

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

Option A: expose the subdirectory URL

Use /var/www/example.com/wordpress as the relevant root for the site or map the URL so visitors intentionally use https://example.com/wordpress/. WordPress’s site URL and home URL must agree with that choice. Links, redirects, and login paths will otherwise point to a different location.

Option B: keep files in a subdirectory but serve the domain root

WordPress documents a second arrangement in which visitors use https://example.com/ while the core files remain under /wordpress. This requires moving or exposing the core entry files appropriately and placing a root .htaccess or front-controller rule that sends requests to the subdirectory’s index.php. Follow that layout consistently; do not mix the subdirectory URL with root-level rewrite rules.

Best Value
Sale
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

The .htaccess file is hidden on many FTP clients. Enable the client’s “show hidden files” setting before concluding that the file is missing. Apache must also be allowed to read per-directory overrides, which is why the example vhost uses AllowOverride All.

8. Fix the second-stage permalink problem

Once the Apache default page is gone, a request such as /about/ may still return a 404 even though the home page works. That is no longer a virtual-host-selection problem. Check three items:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Confirm the selected vhost’s <Directory> block permits overrides with AllowOverride All (or the narrower setting required by your policy).
  2. Ensure Apache’s rewrite module is enabled on platforms that package it separately.
  3. In the WordPress administration area, open the permalink settings and save them once to regenerate the rewrite rules.

Test the home page and one known permalink after each change. Keep the vhost-routing test separate from permalink testing so a rewrite failure does not obscure a hostname failure.

9. Common traps that make the default page persist

Testing by IP only

An IP request does not identify the intended name-based site. Use the domain or an explicit Host header for routing tests.

Correcting only the A record

Clients that prefer IPv6 may continue using an incorrect AAAA record. Check both record types and remove or correct stale entries.

Editing a file Apache did not load

Sites in a “sites available” directory are not necessarily active. Confirm the configuration appears in apache2ctl -S or the platform’s enabled-site listing.

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

Using a hostname that is not declared

example.com and www.example.com are separate names. Declare every name you publish and request, or redirect one deliberately after both names reach the intended vhost.

Changing WordPress URLs too early

Do not alter the database or WordPress URL settings while Apache is still serving its default site. First prove that the correct vhost and filesystem root answer the request.

10. Decide between self-managed Apache and managed WordPress hosting

The routing procedure above applies when you control the web server. A managed WordPress service may hide vhost files, TLS configuration, logs, and DNS controls behind a provider dashboard. In that case, the provider must map the domain to the site, while you verify the domain’s records and the site assignment in the dashboard.

Deployment path Control Debuggability Operational burden Migration concern
Self-managed Apache Direct control of vhosts, filesystem paths, modules, and reloads. You can inspect vhost maps, request headers, and per-site logs. You maintain DNS, TLS, updates, permissions, backups, and service health. Moving the site requires preserving domains, redirects, database contents, and filesystem paths.
Managed WordPress hosting Provider controls the web-server layer; you use its domain and site settings. Provider tooling may expose fewer Apache files and logs. DNS, TLS, backups, and much of the WordPress operation may be handled for you. Confirm that domains, redirects, database data, and paths can be preserved before migrating.

If a managed host shows an Apache default page, provide its support team with the exact hostname, the result of the DNS check, the time of a test request, and whether the raw IP behaves differently. Those details identify a domain-assignment problem faster than a generic “WordPress is down” report.

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

11. Final verification checklist

  • The browser URL uses the hostname declared in ServerName or ServerAlias.
  • The domain’s A and AAAA records point to the intended server.
  • The active vhost’s DocumentRoot contains wp-admin, wp-includes, wp-content, and index.php.
  • The matching <Directory> block grants access and permits the rewrite rules your installation needs.
  • The site configuration is enabled, and the default site is not intercepting the request.
  • apache2ctl configtest (or the platform equivalent) succeeds before reload.
  • apache2ctl -S shows the expected hostname on the expected port.
  • An explicit Host-header request reaches WordPress, while logs record it in the intended vhost.
  • HTTP and HTTPS vhosts use the same hostname and WordPress root.
  • If files are in a subdirectory, the chosen root URL or subdirectory URL is implemented consistently, including the root .htaccess arrangement when required.

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.