Each domain a page
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: Easily reuse and maintain elements like forms on several domains at once. Bring in more traffic using landing pages for multiple domains without hassle. Favicon support for each domain, fallback from child pages to parents. Support for custom post types, e.g. FAQ posts, portfolio posts. 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’: # BEGIN ruigehond007 Header set Access-Control-Allow-Origin "*" # 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.
Top keywords
- wordpress7×1.38%
- htaccess6×1.19%
- domain5×0.99%
- landing5×0.99%
- page5×0.99%
- pages5×0.99%
- work5×0.99%
- blog4×0.79%
- installation4×0.79%
- nginx4×0.79%
- able3×0.59%
- add3×0.59%
Multisite Blog Alias
WP Multisite plugin to maintain URL-redirects for Blogs. Features Permanent 301 Redirect to blogs main domain Painless installation and activation – no file access necessary. Checks domain status Supports UTF-8 Domains WP-Cli commands Usage Set up your DNS. Make sure your Domain points to your WordPress installation. You can achieve this by either setting up an A- or CNAME-Record in your DNS configuration. Your webserver must be configured to handle requests on the given Domain. Under Network Admin – Sites edit the site and select the Alias Domains Tab. Enter the domain without http ao / and click “Add”. Click “Check Status” to see if it worked. If something went wrong you will see an error message. If you want to redirect with URL path appended (e.g. from some-alias.tld/some/path to some-real-blog.tld/some/path), add this to your wp-config.php: define( 'WPMU_BLOG_ALIAS_REDIRECT_WITH_PATH', true ); Status messages Warning: The domain matches the site URL of this blog: The Blog is using the domain name as Site URL. Error: The domain is already used by another site: A different Blog is already using the domain as Site URL. Eiter Remove the alias from the sblog you are currently workin on, or from the other one. The domain is unreachable: There is likely an error in your DNS or your Webserver configuration. Use nslookup from he command line or whatsmydns.net to check the DNS-Settings. The domain or a redirect does not point to this blog: Following all redirects did not end up on your WordPress-Site, but somewhere else. There is likely an error in your DNS or your Webserver configuration. WP-CLI Examples Listing Domain aliases List alias domains for blog-id 123 wp alias-domains list --blog_id=123 Output minified json of all aliases wp alias-domains list --format=json --compact=2 Output csv including the header row but omitting other messages into file wp alias-domains list --format=csv --compact > alias-list.csv Add Domain Alias wp alias-domains add --blog_id=123 --domain_alias=quux.foobar.tld Remove Domain Alias Remove a specific alias wp alias-domains remove --domain_alias=quux.foobar.tld Remove all aliases for blog 123 wp alias-domains remove --blog_id=123 Testing Domain Aliases wp alias-domains test --domain_alias=quux.foobar.tld Plugin PHP-API The plugin introduces two functions allowing you to add / remove a domain aliases from inside PHP. Add Domain alias $result = alias_domain_add( $blog_id, 'quux.foobar.tld' ); if ( is_wp_error( $result ) ) { // handle error } Remove specific Domain alias $result = alias_domain_remove_by( 'domain_alias', 'quux.foobar.tld' ); if ( is_wp_error( $result ) ) { // handle error } Remove Domain aliases for a specific blog $result = alias_domain_remove_by( 'blog_id', 123 ); if ( is_wp_error( $result ) ) { // handle error } Development Please head over to the source code on Github.
Top keywords