I have a client who has a custom site that they would like to migrate over to wordpress. The site has 7500 unique subdomains that point to one PHP template. That template pulls in content from the database based on subdomain. So on their custom build there is only 1 page that exist for the subdomains, a single template page. This page does nothing but dynamically call using the contents of the subdomain to the sql database to retrieve the list of contents that fit the requirements ( keywords, Titles, copy etc.) of the calling document. This one page is then duplicated to all the subdomains.
Is this doable in Wordpress somehow? My research tells me it is not and this is unique project - the client does not want to lose their SEO footprint. Anybody have suggestions on how to do this the best way?
Do we point the existing subdomains to WP and load in content based on that? I think that would be best, but is it doable as a redirect and in WP pages template structure?
Or should this be built as a custom CMS?
Hi Christian,
This may be possible, but it will certainly not be easy. It will likely involve using the wp_get_referer
function (docs) along with a custom page template to serve the unique content for each page.
And yes, you would point the existing subdomains to the WordPress installation, and then load the unique content based on the referring URL.
Without diving into too much technical detail here, if it can be done in PHP, it can be done in WordPress. But it will definitely require custom coding. There is no theme or plugin that will do this out of the box.
The bigger quesiton is WHY? It's clear this tactic is currently being employed for some grey-hat SEO purpose. If it's working, why change it? You could just as easily run the existing PHP template on the same server as your WordPress site, then use WordPress only to create and manage the other pages and/or blog posts.
So there are likely better ways to think about this than trying to get WordPress to replace their current solution.
That's my two cents, but I've also reached out to a couple of other developers who might have better answers for you.
Hope this helps!
Have you posted this to Facebook’s WordPress Help and Share page?