We need to determine the subdomain pattern (ex: http://cdn-#.domain.tld ) substitution and the maximum number of subdomains we want to work with (ex: 5).
The pattern will transform an url like this 'http://www.domain.tld/img/source1.jpg' to this new url structure 'http://cdn-X.domain.tld/img/source1.jpg' where X ranges from 1 to 5 (max).
NOTE: If you have trouble accessing images using the new address because Wordpress asks you to register the domain then you must insert the following line in the file wp-config.php
include_once(ABSPATH.'wp-content/plugins/domain-sharding/domain-sharding-alias.php');
Then you need to be sure to set write permissions to the aliases folder located within the plugin directory.
NOTE: You'll need to manually create the new A records for the subdomains in your DNS panel. They should have the same ip address of your main domain.
Visit the
Seocom website for more information about SEO or WPO optimization
- Install "Domain Sharding" either via the WordPress.org plugin directory, or by uploading the files to your server inside the wp-content/plugins folder of your WordPress installation.
- Activate "Domain Sharding" plugin via WordPress Settings.
- It's done. Easy, isn't it?
NOTE: If you have trouble accessing images using the new address because Wordpress asks you to register the domain then you must insert the following line in the file wp-config.php
include_once(ABSPATH.'wp-content/plugins/domain-sharding/domain-sharding-alias.php');
NOTE: You'll need to manually create the new A records for the subdomains in your DNS panel. They should have the same ip address of your main domain.