Each Domain a Page

plugin banner

Serves a specific page from WordPress depending on the domain used to access your WordPress site.

Author:Joeri van Veen (profile at wordpress.org)
WordPress version required:5.0
WordPress version tested:6.5.3
Plugin version:1.6.5
Added to WordPress repository:26-09-2019
Last updated:09-05-2024
Rating, %:100
Rated by:1
Plugin URI:https://github.com/joerivanveen/each-domain-a...
Total downloads:1 077
Active installs:100+
plugin download
Click to start download

Easily manage a large number of landing pages or one-page websites from a single WordPress site. (For multisites use Multisite Landingpages.)

This plugin is intended as an easy way to map different domains to different landing pages from your WordPress site. That way you can easily maintain a large number of small sites from a single WordPress installation.

You don’t have to set anything up, it works out of the box.

Just point a domain that you own to your WordPress installation. In WordPress, create a page for that domain. The slug should be the domain name without ‘www’ and with the .’s replaced by hyphens.

You can see it working on my own domain: wp-developer.eu, which shows a special page with slug ‘wp-developer-eu’ on my joerivanveen.com blog (joerivanveen.com/blog/wp-developer-eu is the same).

Since 1.5.0 it works with custom post types as well (e.g. WooCommerce products, FAQ posts, portfolio posts), let me know if you have a custom post type that doesn’t work, so I can investigate.

Benefits:

  1. the rest of your website keeps working as usual

  2. you can easily reuse and maintain elements like forms on several domains at once

  3. bring in more traffic using landing pages for multiple domains without hassle

Caveats:

  • the one-page sites all look quite similar to your main site, if you want more flexibility (and more work) there is WordPress Multisite

  • some themes use webfonts, for them to work a couple of rows are added to your .htaccess, these are clearly marked #ruigehond007 (this is my seventh plugin)

  • if your blog is in a subfolder of the main site (e.g. my-site.com/blog) you need to take an extra step for this to work, see installation

  • not all custom post types are guaranteed to work as landing page, e.g. WooCommerce products need additional work to be able to access the main cart

I put special care in making the plugin very lighweight, you will notice it has virtually no effect on the speed of your installation.

NGINX

NGINX does not process .htaccess files as standard. Best is to add the following to your nginx.conf file:

location ~* \.(eot|ttf|otf|woff|woff2)$ {
    add_header Access-Control-Allow-Origin *;
}

Alternatively you can switch on processing of .htaccess files in your nginx.conf file. In your hosting environment this may be done by disabling ‘direct delivery’ or something similar.


Screenshots
ChangeLog