Title: Each domain a page
Author: Joeri van Veen
Published: <strong>September 26, 2019</strong>
Last modified: August 15, 2026

---

Search plugins

![](https://ps.w.org/each-domain-a-page/assets/banner-772x250.png?rev=2969273)

![](https://ps.w.org/each-domain-a-page/assets/icon-256x256.png?rev=2969273)

# Each domain a page

 By [Joeri van Veen](https://profiles.wordpress.org/ruigehond/)

[Download](https://downloads.wordpress.org/plugin/each-domain-a-page.1.8.2.zip)

 * [Details](https://pirate.wordpress.org/plugins/each-domain-a-page/#description)
 * [Reviews](https://pirate.wordpress.org/plugins/each-domain-a-page/#reviews)
 *  [Installation](https://pirate.wordpress.org/plugins/each-domain-a-page/#installation)
 * [Development](https://pirate.wordpress.org/plugins/each-domain-a-page/#developers)

 [Support](https://wordpress.org/support/plugin/each-domain-a-page/)

## Description

Easily manage a large number of landing pages or small websites from a single WordPress
site.

This plugin offers an easy way to map different domains to different landing pages
on your WordPress site. Now 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).

#### Benefits:

 1. Easily reuse and maintain elements like forms on several domains at once.
 2. Bring in more traffic using landing pages for multiple domains without hassle.
 3. Favicon support for each domain, fallback from child pages to parents.
 4. Support for custom post types, e.g. FAQ posts, portfolio posts.
 5. The rest of your website keeps working as usual.

#### Caveats:

 * Some themes use webfonts, for them to work a couple of lines 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 tab.
 * 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.
 * If you need more flexibility (and more work) there is WordPress Multisite.

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

### Favicons

Switch on `with_favicon` on the settings page, to allow adding favicons to each 
landing page (and other pages and posts as well).

Supplying the correct favicon(s) is your responsibility, the plugin will not verify
their validity.

As a rule of thumb I would use a small(ish) SVG for modern browsers, and a 32×32
pixel ICO file as fallback.

You may need a plugin to be able to upload ICO and SVG files, since they are blocked
by default.

#### .htaccess

In case the plugin was not able to update your `.htaccess`, these are the lines 
for your `.htaccess` to make webfonts function properly, you can add them right 
after ‘#END WordPress’:

    ```
    &#35; BEGIN ruigehond007
    <IfModule mod_headers.c>
    <FilesMatch ".(eot|ttf|otf|woff|woff2)$">
    Header set Access-Control-Allow-Origin "*"
    </FilesMatch>
    </IfModule>
    &#35; END ruigehond007
    ```

You may need to switch on headers module in your Apache configuration, if it is 
not already.

### 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

[⌊Example page reacting to a specific url⌉⌊Example page reacting to a specific url⌉[

Example page reacting to a specific url

[⌊Settings screen (1.8.0)⌉⌊Settings screen (1.8.0)⌉[

Settings screen (1.8.0)

## Installation

Install the plugin by clicking ‘Install now’, or the ‘Download’ button, and put 
the `each-domain-a-page` folder in your `plugins` folder. Activate it using the 
WordPress admin ‘Plugins’ page.

During activation the plugin attempts to add a few lines to your `.htaccess`, for
compatibility reasons with webfonts. These lines will still be there after you remove
the plugin. You may remove the lines (clearly marked with #ruigehond007) yourself
at any time of course.

If this failed the plugin will warn you, but function properly nonetheless. If you
notice webfonts are not loading for the extra domains you might want to add the 
lines yourself. The lines are at the bottom of this page.

#### Example of setting up the plugin:

Suppose you have a WordPress website ‘my-website.com’ on ip address 123.45.67.89,
and you want a landing page for www.wp-developer.eu.

 1. Adjust the DNS A records of your domain www.wp-developer.eu to point to the same
    ip-address as your main domain, 123.45.67.89 in this example.
 2. In your hosting environment the extra domain must point to the WordPress directory,
    this is called domain alias, virtual hosting, domain mapping, multidomain or something
    similar.
 3. Create a page or post with a slug `wp-developer-eu`.

If your WordPress sits in the root of your main domain, you are done. Visit your
www.wp-developer.eu domain to see it work.

When you use child pages, e.g. a page with slug `child-page` is a child of `wp-developer-
eu`, you can visit www.wp-developer.eu/child-page to see the child page.

#### WordPress is installed in a subfolder

If your WordPress installation is in a subfolder of your main domain (as with my
site: joerivanveen.com/blog) and you point your domains to that subfolder (as you
probably should), you need to take an extra step for this to work.

Create a subfolder with the same name as your blog, in this case ‘blog’, copy the
index.php file from your main folder to that subfolder, and change the reference
to the wp-blog-header.php file to the correct location.

So if your blog is in my-site.com/news, you have to create a subfolder ‘news’ in
your subfolder ‘news’: my-site.com/news/news and put the index.php in that deepest
folder: my-site.com/news/news/index.php

In the index.php file you have to change the line:

    ```
    require __DIR__ . '/wp-blog-header.php';
    ```

to

    ```
    require __DIR__ . '/../wp-blog-header.php';
    ```

You only have to do this once of course, it works for all domains that you point
at this installation.

#### Canonicals?

Standard, pages will identify with the main site url and their own slug (and permalink
structure). You can see that in the head of the page in the canonical and og:url
properties.

Some SEO plugins let you specify another ‘canonical’ for a page. This may be a good
option for you to use.

Alternatively, you can check the ‘use_canonical’ option of each-domain-a-page. It
will attempt to return the domain for the landing page / post everywhere within 
WordPress. This has the added benefit that users will be sent to that domain when
they click on the link for your landing page.

Please note that _you need to visit_ each (child) page using your preferred domain
for the canonical to be activated.

You can redirect your visitors to the canonical domain always with the `force_redirect`
option.

Canonical functionality is switched off for admin pages, to allow page builders 
to work properly.

#### Locales?

If you need (some) landing pages to use a different locale, you can specify that
in the settings. This will (re)load all translation files that are available in 
that locale. If you use this it is best to have the default locale of your installation
set to ‘English (United States)’ to avoid reloading all the files.

For instance my joerivanveen.eu site is in Dutch, while the rest of my site is in
English (United States). I have added one row to the ‘locales’ textarea: joerivanveen-
eu = nl_NL. The child pages of the mentioned slug will also get this locale. Leave
this textarea empty if you don’t need it, it will not affect your installation at
all then.

#### CORS?

By default, this plugin will configure ajax requests to be sent to the domain currently
served, to avoid CORS errors.

In addition, CORS headers will be sent for configured domains.

#### Child pages

If you have a page with slug ‘example-com’ and a child page with slug ‘child-page’,
you can visit ‘www.example.com/child-page’ to see the child page.

Sometimes when you change things up, it seems like it is not working. This is often
due to very aggressive caching of redirects in modern browsers (they keep redirecting
even if the site is not anymore) but it can also be there are stale canonicals. 
You can empty the canonicals by disabling the plugin and re-enabling it. You have
to visit your pages again to load the canonicals one by one. Settings will be preserved
unless you uninstall the plugin completely.

## Reviews

![](https://secure.gravatar.com/avatar/7da9b60438e541b0c68920ae802050ee115b45c5245fd3650a1a42f7f0159aea?
s=60&d=retro&r=g)

### 󠀁[Awesome and great working plugin](https://wordpress.org/support/topic/awesome-and-great-working-plugin/)󠁿

 [vasilistein](https://profiles.wordpress.org/vasilistein/) December 8, 2024

I am glad i have discovered this plugin, it is lightweight and work great.

![](https://secure.gravatar.com/avatar/40214cf263e9584789ff2bdcec1fd1a45c23dbbb7580ac343e7e54b79a7970bc?
s=60&d=retro&r=g)

### 󠀁[Perfect plugin for my needs](https://wordpress.org/support/topic/perfect-plugin-for-my-needs-6/)󠁿

 [LinuxArchitect](https://profiles.wordpress.org/linuxarchitect/) September 9, 2024

I have a group of related websites and was never happy with my design options. I
first tried multisite and then redirects to landing pages on a single site. I never
thought of looking for this type of solution, but I am so pleased to have found 
it. It seems to work perfectly, and I received great support to troubleshoot a problem
in my apache config file.

![](https://secure.gravatar.com/avatar/65d681fe4d63e561ae3974640ef8e534025d7434c759f61d5b9887cb7e3a353f?
s=60&d=retro&r=g)

### 󠀁[Good](https://wordpress.org/support/topic/good-8559/)󠁿

 [Robothead](https://profiles.wordpress.org/toktor/) July 9, 2024

Good plugin, working as intended. Well written, no spam and not intrusive.

![](https://secure.gravatar.com/avatar/60aaa63f720252e0af5dc8eee62937f8a0acdde8fa2b87c0ea5595903f98bde0?
s=60&d=retro&r=g)

### 󠀁[Great plugin](https://wordpress.org/support/topic/great-plugin-39166/)󠁿

 [dimitrow](https://profiles.wordpress.org/dimitrow/) July 7, 2024

Just work!

![](https://secure.gravatar.com/avatar/4c4c77afc1f6b47d9310ccd3dc62ba765982ceafff0715fa1429ef4d4610e438?
s=60&d=retro&r=g)

### 󠀁[Does not work](https://wordpress.org/support/topic/does-not-work-1566/)󠁿

 [johannf78](https://profiles.wordpress.org/johannf78/) February 12, 2024 1 reply

Instructions on how to set it up is not very detailed or clear. There is no support.

![](https://secure.gravatar.com/avatar/fcd75effb9f7acc4e2d2af5818932eea0c947b27238848192447b590d2efa5b4?
s=60&d=retro&r=g)

### 󠀁[Five Stars!](https://wordpress.org/support/topic/five-stars-151/)󠁿

 [Dainismichel](https://profiles.wordpress.org/dainismichel/) October 5, 2023

Works…thank you!

 [ Read all 8 reviews ](https://wordpress.org/support/plugin/each-domain-a-page/reviews/)

## Contributors & Developers

“Each domain a page” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Joeri van Veen ](https://profiles.wordpress.org/ruigehond/)

“Each domain a page” has been translated into 2 locales. Thank you to [the translators](https://translate.wordpress.org/projects/wp-plugins/each-domain-a-page/contributors)
for their contributions.

[Translate “Each domain a page” into your language.](https://translate.wordpress.org/projects/wp-plugins/each-domain-a-page)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/each-domain-a-page/),
check out the [SVN repository](https://plugins.svn.wordpress.org/each-domain-a-page/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/each-domain-a-page/)
by [RSS](https://plugins.trac.wordpress.org/log/each-domain-a-page/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

1.8.2: fix php warning missing ‘host’ and children of child pages

1.8.1: remove superfluous message when favicons are not saved by meta box

1.8.0: accomodate page builders and add favicon per post / page

1.7.0: preserve query string and use canonical in admin environment

1.6.5: (re)allow custom post types

1.6.4: prevent title to be changed on other settings pages

1.6.3: small fixes

1.6.2: honor locale for punycode domains

1.6.1: restore php 5.6 and use of query string compatibility

1.6.0: add force-redirect option

1.5.2: remove unnecessary punycode conversion and update docs

1.5.1: reroute ajax and send cors headers for increased compatibility

1.5.0: add support for custom post types, e.g. woocommerce products

1.4.0: add support for child pages on the landing domains

1.3.6: add cartflows_step to supported post types, use utf-8 version of tag when
matching for locale

1.3.5: fix admin url could be wrong if main site url is used as a slug

1.3.4: improved: less processing on other pages

1.3.3: support for intl domain names (punycode)

1.3.2: several fixes and improvements regarding the canonical cache

1.3.1: ajax url updated with the correct current domain name

1.3.0: improved stability, ajax url made relative to avoid CORS errors, added locale
option

1.2.3: readme updated

1.2.2: now cleans title for targeted pages

1.2.1: added translation

1.2.0: added support for posts, fixed canonical for pages and posts

1.1.0: removed modes, added canonical options

1.0.1: changed text-domain for translations to work properly

1.0.0: fixed readme and display of .htaccess warning

0.3.0: fixed webfonts issue with .htaccess

0.2.0: added languages and .pot

0.1.0: settings page and two modes optimised

0.0.1: setup a working example / proof of concept for two modes

## Meta

 *  Version **1.8.2**
 *  Last updated **2 months ago**
 *  Active installations **200+**
 *  WordPress version ** 6.2 or higher **
 *  Tested up to **7.1.3**
 *  PHP version ** 5.6 or higher **
 *  Languages
 * [Chinese (China)](https://cn.wordpress.org/plugins/each-domain-a-page/), [Dutch](https://nl.wordpress.org/plugins/each-domain-a-page/),
   and [English (US)](https://wordpress.org/plugins/each-domain-a-page/).
 *  [Translate into your language](https://translate.wordpress.org/projects/wp-plugins/each-domain-a-page)
 * Tags
 * [domain](https://pirate.wordpress.org/plugins/tags/domain/)[favicon](https://pirate.wordpress.org/plugins/tags/favicon/)
   [landing page](https://pirate.wordpress.org/plugins/tags/landing-page/)[mapping](https://pirate.wordpress.org/plugins/tags/mapping/)
   [page](https://pirate.wordpress.org/plugins/tags/page/)
 *  [Advanced View](https://pirate.wordpress.org/plugins/each-domain-a-page/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  8 5-star reviews     ](https://wordpress.org/support/plugin/each-domain-a-page/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/each-domain-a-page/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/each-domain-a-page/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/each-domain-a-page/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/each-domain-a-page/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/each-domain-a-page/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/each-domain-a-page/reviews/)

## Contributors

 *   [ Joeri van Veen ](https://profiles.wordpress.org/ruigehond/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/each-domain-a-page/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=hallo@ruigehond.nl&lc=US&item_name=Each+domain+a+page+plugin&no_note=0&cn=&currency_code=USD&bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHosted)