0

is it possible to alternate between two homepages in Wordpress without messing up SEO or anything unforeseen? We want to create Home-old and Home-new for A/B testing purposes.

Thank you!

2 Answers 2

1

Your question seems to conflict itself - you want to run A/B testing, but don't want to mess up your SEO? The point of running A/B testing is to compare which page performs better, so naturally there will be a difference in how each page performs - hopefully your new page variation performs better (which is why you created a new page right?)

To answer the question, you can either load different components onto your homepage using get_template_part:

if($ab_test_version == 'a') {
   get_template_part('template-parts/old-homepage-content');
} else {
   get_template_part('template-parts/new-homepage-content');
}

Or you can change the entire template using the template_include filter:

function ab_test_homepage($template) {
   // Set some sort of variable to divide users between A and B variations
   $which_test = 'b';

   if (is_front_page() && $which_test == 'b') {
      $new_template = locate_template(array('new-homepage.php'));
      if(!empty($new_template)) {
         return $new_template;
      }
   }
   return $template;
}

add_filter('template_include', 'ab_test_homepage', 99);

You of course want to add some sort of tracking and "goal" to measure the performance of both pages, but you can raise that in another question on the appropriate site.

0

It depends on what and how you are making these changes.

If you are changing the HTML, changing or moving elements around like headings, keys word, text, etc. than yes of course it can effect your SEO. Once Google re-indexing your site it could potentially effect SEO.

If you are just changing the look of the page through styles (CSS) of the page than this shouldn't effect your SEO.

It's a little unclear exactly what your doing, but in general that is what I would say.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.