Search code examples
apacheshiro

exposing content that needs login to see to search engines


I have a web based application that utilizes Apache Shiro for authentication/authorization. This means that only a logged in user can see the contents. I want to make those contents searchable to search engines. What are some of the ways that i can expose those contents to search engines?


Solution

  • I'm assuming you mean google and bing and such.

    You can't expose content to a search engine that is behind a login, that is the whole point of secured content.

    If you have certain data that you want to have the search engines index, you could always create a sitemap that is available for anonymous access and upload it to google and bing via a webmaster account.

    Your shiro.ini would look something like this:

    [urls]
    /sitemap.xml = anon
    /** = authc