Skip to main content
grammar, remove fluff
Source Link
Stephen Ostermiller
  • 99.4k
  • 18
  • 141
  • 364

Best SEO way to In WordPress how do you redirect all posts to main url if it's possibleURL in an SEO friendly way?

I posted this is WordPress SE but didn't think it wouldn't probably be better suited here.

I'm working on a affiliate site that has a bunch of products on it. User clicks the product, and goes to the site the product is located on.

Here's my dilemma. All products on my site are each under a different wordpressWordPress post. I have about 1700 products.

When googleGoogle indexed "some" of my site so far, just submitted, I didn't think about what would happen if somebody clicks on a link to a "product" through a googleGoogle search. On my page I have the name of the product, the image of it, the price and then a button to click to head to the site (a CTA button).

So there is no actually other information for the product. So if a product is, for example, a blender. The user would see the name, the image, the price and then click the ctaCTA button and be sent to the site. I don't have individually content for each product other then the price and everything. So I have no use for having a single.php page.

Not knowing this, When I clicked on a link that googleGoogle had index to one of the products, and when i did, it sent me to my site displaying a wierdweird template with half the stuff missing on my site since iI don't have a dedicated single.php page.

What I did was create a single.php page and redirect people to my home page. So if they land on, let's say siteexample.com/category/name-of-product, it will redirect them to siteexample.com where they can go view all my products. Is this the best way to handle this? Sorry newer to wordpress.

This is what I have in single.php.

<?php /*  
Template Name: Page Redirect
*/ 

header('Location: https://example.com');
exit();

?>

EDIT - I WAS PROVIDED THIS METHOD THROUGH ANOTHER USER INSTEAD OF USING HEADER DIRECT.

<?php wp_redirect( home_url() ); exit; ?>

Is there a better way to do this? Or is this sufficient enough? How bad will this affect anythe SEO at all? I have all my ogOG data all set, meta tags all set, and such.

Did I screw myself by not figuring this out before developing my site? In my "newbie" opinion, I believe redirecting all the links to the posts in googleGoogle to my home page would increase my home page thus resulting in better rankings for it. I'm probably wrong but would like other peoples opinions.

Best SEO way to redirect all posts to main url if it's possible?

I posted this is WordPress SE but didn't think it wouldn't probably be better suited here.

I'm working on a affiliate site that has a bunch of products on it. User clicks the product, and goes to the site the product is located on.

Here's my dilemma. All products on my site are each under a different wordpress post. I have about 1700 products.

When google indexed "some" of my site so far, just submitted, I didn't think about what would happen if somebody clicks on a link to a "product" through a google search. On my page I have the name of the product, the image of it, the price and then a button to click to head to the site (a CTA button).

So there is no actually other information for the product. So if a product is, for example, a blender. The user would see the name, the image, the price and then click the cta button and be sent to the site. I don't have individually content for each product other then the price and everything. So I have no use for having a single.php page.

Not knowing this, When I clicked on a link that google had index to one of the products, and when i did, it sent me to my site displaying a wierd template with half the stuff missing on my site since i don't have a dedicated single.php page.

What I did was create a single.php page and redirect people to my home page. So if they land on, let's say site.com/category/name-of-product, it will redirect them to site.com where they can go view all my products. Is this the best way to handle this? Sorry newer to wordpress.

This is what I have in single.php.

<?php /*  
Template Name: Page Redirect
*/ 

header('Location: https://example.com');
exit();

?>

EDIT - I WAS PROVIDED THIS METHOD THROUGH ANOTHER USER INSTEAD OF USING HEADER DIRECT.

<?php wp_redirect( home_url() ); exit; ?>

Is there a better way to do this? Or is this sufficient enough? How bad will this affect any SEO at all? I have all my og data all set, meta tags all set, and such.

Did I screw myself by not figuring this out before developing my site? In my "newbie" opinion, I believe redirecting all the links to the posts in google to my home page would increase my home page thus resulting in better rankings for it. I'm probably wrong but would like other peoples opinions.

In WordPress how do you redirect all posts to main URL in an SEO friendly way?

I'm working on a affiliate site that has a bunch of products on it. User clicks the product, and goes to the site the product is located on.

Here's my dilemma. All products on my site are each under a different WordPress post. I have about 1700 products.

When Google indexed "some" of my site so far, just submitted, I didn't think about what would happen if somebody clicks on a link to a "product" through a Google search. On my page I have the name of the product, the image of it, the price and then a button to click to head to the site (a CTA button).

So there is no actually other information for the product. So if a product is, for example, a blender. The user would see the name, the image, the price and then click the CTA button and be sent to the site. I don't have individually content for each product other then the price and everything. So I have no use for having a single.php page.

Not knowing this, When I clicked on a link that Google had index to one of the products, and when i did, it sent me to my site displaying a weird template with half the stuff missing on my site since I don't have a dedicated single.php page.

What I did was create a single.php page and redirect people to my home page. So if they land on, let's say example.com/category/name-of-product, it will redirect them to example.com where they can go view all my products. Is this the best way to handle this?

This is what I have in single.php.

<?php /*  
Template Name: Page Redirect
*/ 

header('Location: https://example.com');
exit();

?>

EDIT - I WAS PROVIDED THIS METHOD THROUGH ANOTHER USER INSTEAD OF USING HEADER DIRECT.

<?php wp_redirect( home_url() ); exit; ?>

Is there a better way to do this? Or is this sufficient enough? How bad will this affect the SEO? I have all my OG data all set, meta tags all set, and such.

Did I screw myself by not figuring this out before developing my site? In my "newbie" opinion, I believe redirecting all the links to the posts in Google to my home page would increase my home page thus resulting in better rankings for it. I'm probably wrong but would like other peoples opinions.

Source Link

Best SEO way to redirect all posts to main url if it's possible?

I posted this is WordPress SE but didn't think it wouldn't probably be better suited here.

I'm working on a affiliate site that has a bunch of products on it. User clicks the product, and goes to the site the product is located on.

Here's my dilemma. All products on my site are each under a different wordpress post. I have about 1700 products.

When google indexed "some" of my site so far, just submitted, I didn't think about what would happen if somebody clicks on a link to a "product" through a google search. On my page I have the name of the product, the image of it, the price and then a button to click to head to the site (a CTA button).

So there is no actually other information for the product. So if a product is, for example, a blender. The user would see the name, the image, the price and then click the cta button and be sent to the site. I don't have individually content for each product other then the price and everything. So I have no use for having a single.php page.

Not knowing this, When I clicked on a link that google had index to one of the products, and when i did, it sent me to my site displaying a wierd template with half the stuff missing on my site since i don't have a dedicated single.php page.

What I did was create a single.php page and redirect people to my home page. So if they land on, let's say site.com/category/name-of-product, it will redirect them to site.com where they can go view all my products. Is this the best way to handle this? Sorry newer to wordpress.

This is what I have in single.php.

<?php /*  
Template Name: Page Redirect
*/ 

header('Location: https://example.com');
exit();

?>

EDIT - I WAS PROVIDED THIS METHOD THROUGH ANOTHER USER INSTEAD OF USING HEADER DIRECT.

<?php wp_redirect( home_url() ); exit; ?>

Is there a better way to do this? Or is this sufficient enough? How bad will this affect any SEO at all? I have all my og data all set, meta tags all set, and such.

Did I screw myself by not figuring this out before developing my site? In my "newbie" opinion, I believe redirecting all the links to the posts in google to my home page would increase my home page thus resulting in better rankings for it. I'm probably wrong but would like other peoples opinions.