That’s correct– Search engine bots are not logged-in users of your website and thus would always be redirected to the login screen while attempting to visit/crawl your webpage.
If your website is private and requires user login– you shouldn’t let search engines index your site and create cached public copies of your webpages.
Thread Starter
cari18
(@cari18)
Thank you Kevin for your answer.
Yes its a private site BUT I would that users that don’t remenber how to reach the loging page (URL)could find it with a search in Google by typing the site name.
Is there a way to do so ?
@cari18
If you want your site to appear in Google, you’ll need to create a public page that Google can crawl and index.
To make a page publicly accessible, you may bypass Force Login using the available filters outlined in the FAQs.
Good luck!
Thread Starter
cari18
(@cari18)
Ok Kevin thank you, I’ll do so.
2 more questions please:
1. does Force Login addbthe meta balise “no index” in the site page
2. does’t it make sense to whitelist the site url which mean:
$whitelist[] = home_url( ‘//’ );
or
$whitelist[] = home_url( ‘/wp-login.php/’ );
Sorry perhaps stupid questions !
@cari18
1. does Force Login addbthe meta balise “no index” in the site page?
No, Force Login does not alter any page. It only triggers a server-side redirect to the WP login screen if the visitor is not logged-in.
2. does’t it make sense to whitelist the site url which mean:
$whitelist[] = home_url( ‘//’ );
or
$whitelist[] = home_url( ‘/wp-login.php/’ );
I’m not sure what you’re asking here. If you want to whitelist the homepage, you may do so using the home_url( '/' ); method.
You don’t need to whitelist the /wp-login.php page because Force Login already allows the WP login page to be publicly accessed (since that is the page Force Login redirects all visitors to).
How you want to whitelist or bypass Force Login, for whichever page(s), is up to you. Examples can be found in the FAQs.
Thanks for using Force Login and good luck!