Skip Navigation

[Resolved] 301 Redirect Archives page to Homepage

This support ticket is created 7 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 2 replies, has 2 voices.

Last updated by Mark Dally 7 years, 9 months ago.

Assisted by: Nigel.

Author
Posts
#414345

This should be a simple one, but I'm nervous about messing everything up.

The way the Real Estate demo theme has been setup is the HOUSES archive acts as the site's homepage.

That means both hidden link (the houses archive) and hidden link (/) render as the homepage.

As far as SEO goes, this has the two entries in the sitemap with the same content which Google thinks = bad.

But a simple 301 in htaccess will move anything, including subordinate posts of the archive to the homepage = really bad!

So my question is how can I redirect only hidden link to the homepage without redirecting every subordinate also?

Thank you in advance!

#414472

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Mark

I didn't dig into writing a redirect rule in my .htaccess file directly, but in principle you can set up rewrites without using wildcards so that only the specific url redirects, not all of the subordinates.

For testing I installed the simple 301 redirects plugin and added a rule to redirect /house to / which worked as expected.

I could visit individual houses at their normal url, but if I tried to visit sitename.com/house it would redirect to the home page.

How are your sitemaps being generated?

If there is no link to the houses archive then the duplication problem doesn't arise because google won't reach the page. I haven't spent time digging, but it occurs to me that if you replace the menu custom post archive link for houses with a simple link to the homepage which you call 'houses' so that there is no link to the archive that might be all you need. There don't appear to be breadcrumbs or other links to the house archive, but you would need to confirm that yourself.

If you are using a sitemaps plugin that automatically adds the archive page regardless then you may be able to exclude it.

And you also have the option of editing the houses CPT and specifying that it has no archive.

#414481

Hi Nigel - thank you for your thoughtful and careful reply. I had tried adding the simple redirect in the htaccess file, but as I thought, it caused a multiple redirect failure because it was trying to redirect the archive and all of the subordinates to the homepage over and over again (Using --> Redirect 301 /house hidden link).

But funny thing - I'm using Yeost SEO. And although it failed hard coded into the htaccess file, the new version of Yeost has a feature (I don't really like it myself) that automatically remembers redirects.

Although I replaced the htaccess with the original, the Yeost plugin has kept the redirect but made it work.

So I guess it is fixed!

Thank you once again.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.