Redirects and Password Protected Directories in cPanel

    The article was added by Mihai T. at 09/28/2008.

  Submit | About | Contact & Privacy Policy

You are here: Articles Directory » Web Hosting

Bookmark and Share

Redirects are designed to help you keep the flow of your website while redirecting users and search engines to the new location for content that has moved. Here you can specify a redirect in the form, http://domain.com/redirectname that will instantly take you to any web address you specify.

A temporary redirect is used for content that may have moved to a new location, but isn't going to be there forever. This sort of redirect generates a 302 (resource has moved temporarily). It doesn't much matter to end users, but this code tells search engines not to update the resource location with the new URL. A permanent redirect (which generates a 301 code) tells search engines that the new location is permanent and they should update their records and stop linking to the old URL for that resource.

Hotlink Protection: Stop People from Stealing Content

If you run a website where digital content (pictures, files, and so on) is your livelihood, then you may want to turn on this feature. Hotlink protection will stop people on other websites linking directly to your files unless they have approval from you.

To turn this on you need to define:

• The list of domains that are permitted to link to your files. cPanel will automatically add any of your own domains to the list of approved domains but feel free to edit these as needed.

• The list of file extensions (JPG, MP3, and so on) that you want to protect. cPanel will automatically add a list of common file extensions but feel free to edit these as needed.

• A URL to redirect people to if they try to hotlink to your files (typically a page on your site that says Sorry, you can't access this file unless you are a member of my site.) • If you want to allow people who manually type an address pointing to one of the files on your website to access the file or if you want them redirected to the same URL you entered above. To allow direct links, click the checkbox just above the Activate button.

Click Activate to turn on hotlink protection. Click Deactivate to stop using hotlink protection. Do not try to use this feature if you have FrontPage extensions installed (it won't work). If you use FrontPage extensions, you need to use Microsoft FrontPage itself to manage hotlink protection.

Password-Protect Directories

Do you have content in your website that you would like to restrict access to? cPanel makes the process fairly painless. The first thing you have to do is to create a directory inside your public_html directory that will contain your protected content. You can name it whatever you like. You can use your FTP client to create this directory or you can use cPanel's file manager described earlier. Now come back to the Password Protection area. You will see a list of every directory inside your public_html directory and a link for the current folder (which is your public_html directory in this case). If you click the small icon of a folder next to the directory's name, you will be able to see any directories nested inside that one. This way you can choose to protect a nested directory. If you click on the actual name of the directory, you will be taken to the security and account creation screen.

There are actually two separate things to do on this screen. The top half of this screen turns security on and off for this directory. If you want security to be on, then click the checkbox next to the Directory requires a password to access via the web item. Below that is where you can enter a short name or phrase that will appear in the dialog box that pops up asking you for your username and password. This item is purely optional, but it is a nice touch so that your users know what area they are trying to log into, in case there is more than one secured area. If you are done you can click Save and security will be set for that folder/directory.

You also need to create at least one authorized user or no one will be able to access the files in this directory unless they log in as the administrator via FTP. To create a username and password, just type them into the appropriate boxes and then click the Add New User button next to the Username field,. This user will now appear in the Active Users list, which means they now have access to this directory. Create as many users as you need. If you need to change the password of a user that has already been created, then just type the user's exact username and then type in a new password and then click the button next to the password field, Change Password.

You will then be notified that the password for that user has been changed. When you are all done, then you can click Save to commit all the changes you made. If the directory has been successfully secured, you will see a small lock icon next to the folder icon for that directory. You cannot password-protect the public_html directory via this feature in cPanel.

Do not try to use this feature if you are using the FrontPage extensions. FrontPage handles page security through those server extensions rather than using the standard directory protection feature. If you have password protection set in cPanel and you install the FrontPage extensions, then all of your settings for password protection will be deleted and you will need to use FrontPage to manage security until you remove the FrontPage extensions, at which time you will have to re-enter all password protection information into cPanel.

Web Hosting Disclaimer

  • The ArticleCity.info articles directory team is not responsible for falsehoods, inaccuracies, or any other types of misinformation this article may contain and will not be liable for any damage or loss suffered by a user through the user's reliance on the information gained here.
  • ArticleCity.info articles directory is not responsible for any and all copyright infringements by writers and authors. If you suspect the information contained by this page for any copyright infringements, please contact us and we'll investigate the specific article(s) and we will remove the copyrighted material.
Other Web Hosting articles
Understanding how networks work on a basic level - The Basics of Networks Understanding how networks work on a basic level is fairly simple but can quickly become complicated. This is especially true if you are unfamiliar how the technology within different networks functions. From a mecha...
There are many roles that a server can occupy - There are many roles that a server can occupy. For each one there is a unifying similarity: they have to be on a network and have other computers connect to them. In addition to that, these connecting computers have to request something that the s...
Customer Service Leading the Way in Technology - Just the mere mention of the word “internet” can sometimes be very intimidating to people. It's been known to give off the impression that it's to highly technical and confusing for any of us to understand. Unless we've had years of experience, or...
Web hosting requirements at a hosting company - What are the Company's Hosting Policies? Amid all of the marketing material on your potential host's website there is usually some fine print (or worse yet, some things aren't even mentioned publicly) concerning the rules they impose ...
cPanel web hosting account explained - Getting Started with cPanel Now that you have a shiny new cPanel web hosting account, it is time to learn the ropes of cPanel's interface. However, b...
cPanel Interface and general hosting account information - The Main cPanel Interface If you have successfully logged into your account, you should be presented with the main cPanel interface, shown below: ...
cPanel and its general server information explained - General Server Information This is followed by information about the server your account is on: Operating System: This is the operating system that the server your account is on is running. Probably this will be Linux. ...
FTP accounts in your cPanel web hosting account - FTP and cPanel's File Manager It is most likely that one of the first things you will want to do after getting your web hosting account, and taking...
Creating and Managing FTP Accounts under cPanel - Creating and Managing FTP Accounts in cPanel Depending on your hosting plan, you may not be limited to just a single main FTP account. Why would you need more than one? You probably don't if you are the only person wh...
cPanel File manager and File permissions - cPanel's File Manager FTP is not the only way to manage files and directories in your hosting account. cPanel includes a File Manager that will allow you to do almost anything you can via FTP (and a number of things t...