I am using drupal for one of my portals. Logged in users can see the "documentation link" button in the application which is pointed to an html page. My concern is that, that link is accessible even if someone bookmark the link and open it without logging in to drupal portal. Is there some option/module in drupal available so that if someone access our documentation link directly, it should redirect to login page and load the html page if he is already logged in.
Assuming that documentation link is a landing page either resulting from a content type or View Page, you can easily restrict the access to that page via permissions. The concept can be found using Node View Permissions. Although the module is overkill, it will provide ways on how to use it. The recommendations would be to do this through standard permissions first and then use modules or write your own custom module to do this for you.
Additionally you could write a hook that checks to see if user is an anonymous user, if so then let them through otherwise redirect them to a login page. In D7, you can write a hook to check the user_is_logged_in variable. In D8 this answer to check for logged in users.
Also when you add questions, please indicate if it's for D7 or D8.