Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Unusual Redirect / Site Structuring issue

redirect

         

bigvibes

11:28 am on Apr 2, 2017 (gmt 0)

10+ Year Member



Hi, I've got a rather unusual redirection need. I'm setting up a brand new niche site on WordPress, which hopefully in a few years does really well and we're hoping to make a larger site with multiple topics (also on WordPress). The domain name we have is very general and the niche is specific so I was thinking the larger site would be better suited to taking the general main domain name and the niche would be created in a subdirectory with a specific name (/niche). My question is how to structure this site and properly do the redirects.

I'm thinking I could create the site as a WordPress install in a subdirectory (/niche) then either:

a) 301 redirect everything in /niche to the main URL so that the URLs are shorter or

b) leave it as is and redirect just the homepage /niche to the root URL. The downside of this is that all my links except the homepage would have /niche before the filename. The upside I suppose is that I wouldn't have to do redirects (not sure if this helps any in terms of performance)

Then the second part of this question is what to do when building the larger site. After creating a separate WordPress install in the root directory what would be the best method if I went with either A or B above?

I suppose I cannot redirect everything to /niche because it would redirect users to the subsite and that's not what I want. I just want to redirect the specific pages. Should I create separate redirects for each page?

My biggest issue is if I created a page say /niche/subscribe and had it redirected to /subscribe then redirected it back to /niche/subscribe I would not be able to create a page named /subscribe on the larger site because users would get redirected to the subscribe page of the niche site. Would I have to create all different page names?

Or something else?

not2easy

1:48 pm on Apr 2, 2017 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



First thing about the plan is that WordPress is a CMS - a Content Management System, it is sort of self contained. You set the URL for it when you set it up, then it creates its own URLs based on the Permalink structure you set up. The internal URL structure is handled by the settings. Installing multiple installs of WP on one domain 'can' be done, but there are other versions of WP that you might want to consider when you reach the point of expansion. If the concern is the URL structure, you control that in your Admin > Settings panel, not via rewrites.

It is a good idea to set up a plan, think about what you want to do and then decide what will work best for you. It is a good plan to learn how the CMS works before you get big and busy. Not a good plan to learn as you go and try to make it do things it doesn't do well. An example is the /subscribe issue - that is best handled using plugins rather than "pages". It may take a few weeks (or more) to research your options, but it is better than trying to patch it together with .htaccess rewrites.

A problem of running a WP install from a subdirectory and having it appear to be in the root directory is that it requires an index.php file to stay in the root directory so installing a separate WP install in the root directory would be very tricky because there are then two index.php files in the root directory (there can only be one). In that case you probably want WP MultiSite [codex.wordpress.org]

My recommendation is that you first set up a single WP install [codex.wordpress.org] and learn to deal with its ways, then if you need to expand you can always move that database to a different version.

Something to keep in mind while you are researching is Security. Because there are so many WP sites, it is a popular target for exploit attempts. Spend time learning how to strengthen your install before it is loaded up with data. Also remember that Plugins are not magic. Research them well and use sparingly.

bigvibes

12:20 pm on Apr 7, 2017 (gmt 0)

10+ Year Member



I try to avoid plugins... what plugin would you suggest then for doing this as you mentioned above?

If I set up a single WP install then I want to move to multisites can I do that? Is that what you mean when you say expand to a different version?

not2easy

2:08 pm on Apr 7, 2017 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Not sure what part of "doing this" you are asking about a plugin to address. Most of what is outlined there is things that you would do.

Yes, it is fairly straightforward to export and then import the content and settings to a new structure of WordPress. Downsizing from Multi-Site to a single install would not be quite as simple.

bigvibes

10:30 am on Apr 13, 2017 (gmt 0)

10+ Year Member



Ah yes, this is what I was referring to: An example is the /subscribe issue - that is best handled using plugins rather than "pages"

not2easy

11:27 am on Apr 13, 2017 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



There are several plugins that can handle communications, personally I like the Fast Secure Contact Form plugin. It takes a little time to set up, but gives you many tools such as forwarding and auto response and integrates with Akismet to keep junk messages out of your inbox. This is not one of those Subscribe forms that can be pushed via modal into everyone's face as soon as they hit your site. I don't have any suggestions for those except maybe to avoid them, but that is just my opinion, they work for some sites, but don't belong in a community.

When you are researching plugins, it is a good idea to check into the stability and security [wpvulndb.com] of them and whatever plugins you install, keep them up to date.

TorontoBoy

1:59 am on Apr 14, 2017 (gmt 0)

5+ Year Member Top Contributors Of The Month



I'm not sure what you want from your web site, but it sounds like you have some sort of category, called niche. After a couple of years you would like to expand this to offer other additional categories, but under a single web site. Instead of trying to use separate WP installs and attempt to somehow tie them together, consider a single WP install but use different tags in order to separate the specific bodies of content.

How different will the niche site be from any future add-on categories sites? Same forms and navigation, but different content? Different layouts, themes? Completely different forms, additional fields, separate navigation? All these will influence your architecture.

As Not2Easy has stated, WP security needs to be taken seriously. WP runs 25% of the world's sites and have a big red "X" on their back from hackers and bad bots. Look at the WP security codex [codex.wordpress.org...] . Do 2 level authentication, protect files such as xmlrp.php. WP security needs to be regularly monitored and this takes time and effort. Or sign up with a WP specific hosting service that will take care of security for you.

bigvibes

3:07 am on Apr 14, 2017 (gmt 0)

10+ Year Member



Thanks for the suggestion on the plugin Not2easy. For contact forms I like using Ninja Forms.

TorontoBoy, yep this is the problem. The second site would be different enough that it would require different navigation, layout, etc.

So what I'm getting so far from this thread (correct me if I'm wrong) is to install the site initially as a Multisite installation (because I'll need to redirect the homepage to the subdirectory), then if and when time comes to expand I install a second separate WordPress install as part of the multisite.

My other question at this point is should I go with a subdirectory or subdomain? I hear different things. Some people say you'll lose all the linking benefits if you run a subdomain and a main domain as opposed to running a main domain and subdirectory since search engines treat the latter as one site, but the former as two sites. I've also heard that it doesn't matter and that Google sees subdomains as being part of the main domain. Any thoughts?

TorontoBoy

3:49 am on Apr 14, 2017 (gmt 0)

5+ Year Member Top Contributors Of The Month



Not sure about the SEO benefits, but from a bot fighting perspective I have all 5 WP installs in subdirs, and no site in the root. You can put all bot fighting into the public_html and certain .htaccess rules will be inherited down to all WP sites. This makes it much easier to fight rampant WP bots. Add one rule, cover all WP sites.

Many bots attack WP installs in the root, and I'm glad I don't have one there.