Set up KU authentication on cPanel servers

Table of contents

What is this?

This is an alternative to Shibboleth that works on any KU server that runs PHP 5.6 or higher (tested through PHP 7.3). No external dependencies outside of the ku-auth-this-script.php file are required.

Basic Setup

  1. Go to and save it as a file named ku-auth-this-script.php.
  2. Go to the login page for your site (e.g., and log in with that site's credentials.
  3. Click on the link named File Manager, go to the directory named public_html, and upload ku-auth-this-script.php.
  4. In index.php on your site, add the following line at the very top of the file:
    <?php require_once 'ku-auth-this-script.php'; ?>

That's it! Now, users are required to log in through single sign-on (SSO) in order to use the site. If there are any other pages, add that line in step 4 to the very top of the scripts for those pages, too.

Allow only specific users

If you only want some users to be able to access the site, make a new file in public_html named .htaccess and add the following line (substitute your username for c567l966)


For example, if your site used to use Shibboleth and you have the following line in your .htaccess to allow certain users,

require user

That line may be rewritten for KU Auth as follows:

SetEnv KU_AUTH_ALLOWED_USERS "example anotherusername etcetera"

Keep in mind that these need to be the actual usernames, not just email addresses. You can use to see what the usernames for different users are. For example, if you go to , the email address is but the username is c567l966.

Troubleshooting tips

Having a problem with a website?  Try these tips:

  1. Clear your web browser cache
  2. Restart your web browser
  3. Try a different browser (we recommend Firefox or Chrome)