Server part of public links. Refactoring