Context: I am designing a web application that’s geared toward members-only features. There’s no site features that would be useful to non-members, so most of the website will only be available to authenticated users. Thus, the only public pages will be things like an About Us page (with contact options), a Features/Comparisons page (promote the service relative to competitors), and of course a Home Page.
Problem: My initial thought was that the homepage
index.php file, located at the website root, should load the public content for non-authenticated visitors, but should load the main application landing page for authenticated users. My main reason was for members’ ease-of-access — automatic serving of the content they’re actually trying to get to if they’re already logged in, and no need to type / remember / bookmark a more complicated address than
mysite.com. But this got me thinking whether that would work best in the long run for issues like SEO and maintainability.
Approaches: I can think of three:
- All files are hosted under
mysite.com, with no subdomains. When a visitor requests
mysite.com/index.php, it checks for authentication, and serves up the correct HTML depending. (This is the approach I mentioned above.)
- Public files are hosted under
www.mysite.com, while member-only pages are hosted under a subdomain like
members.mysite.com. When an authenticated user attempts to access the public
www.mysite.com/index.php, they’ll be automatically redirected to
- The same as option 2, but instead of being automatically redirected, the user will stay on the public homepage, and will need to navigate to their application landing page via the main nav. (This approach seems best if some of the public pages actually have usefulness to authenticated users, which they won’t on my site, so I’m thinking this option doesn’t make sense?)
Are there other options I’m not thinking of?
- How does each approach affect SEO, if at all?
- Which of those approaches tends to be easiest to code for and maintain in the long run?