On cPanel & WHM servers, the Apache mod_userdir feature, which allows URL access in the format "http://siteadi.com/~user", although offering a practical use, is a feature that needs to be carefully configured in terms of performance and security.
In this article, we will discuss step by step what mod_userdir is, what it does, what risks it carries, and how to activate mod_userdir protection via WHM.
When enabled on Apache servers, mod_userdir provides direct access to user directories in the form "http://domain.com/~username". This can be useful, especially for developers who want to temporarily access the site during the testing process.
For example:
http://ekasunucu.com/~mehmet → goes to the /home/mehmet/public_html directory.
However, there is an important problem here: All traffic made in this way is reflected in the bandwidth quota of the main domain name, ekasunucu.com
. This situation both prevents fair resource usage and is open to abuse in shared hosting environments.
Unfair traffic loading: Although the user seems to be accessing the ~mehmet
directory, the bandwidth is reflected on ekasunucu.com
.
Security vulnerabilities: Some malicious users may try to view the content of other accounts using this feature.
SSL incompatibility: ~user
access is not compatible with SSL, HTTPS access errors occur.
Server load: System resources cannot be used correctly, performance decreases.
Log in to WHM as root.
Open the Security Center → Apache mod_userdir Tweak section from the left menu.
Check the "Enable mod_userdir Protection" box at the top of the page.
In the user list below, you can select the accounts that you will allow this access as an exception (usually left blank).
Save the settings by pressing the Save button at the bottom of the page.
⚠️ Recommendation: On shared servers, it is recommended that you do not leave this feature open to any user.
If a domain has not been redirected yet, you can temporarily disable protection for access testing.
Be sure to reactivate it after the test is complete.
Alternatively:
The user can be allowed to test with a temporary URL. (For example, instead of http://ipadres/~user
, a preview domain configured directly with the server IP can be used.)
Although mod_userdir seems useful, it is not recommended to leave it directly active. Since it brings with it problems related to server quota, security and SSL, activating protection via WHM is the most accurate approach.
We also recommend that you take a look at the following for cPanel & WHM security:
Web siteniz için uygun fiyatlı Ucuz Hosting Paketleri ile yüksek performanslı barındırma hizmeti sunuyoruz.
Dijital varlığınızı güçlendirmek için profesyonel Sosyal Medya Hesap Yönetimi hizmeti sağlıyoruz.
Görsellerinizi sıkıştırmak için kullanışlı PNG to WebP dönüştürücümüzü deneyin.
Resim boyutlarını küçültmek isteyenler için JPG to WebP aracı idealdir.
SEO uyumu için Robots.txt Oluşturucu aracımızı kullanabilirsiniz.
Htaccess Oluşturucu ile yönlendirme ve erişim ayarlarınızı kolayca yapın.
Kullanıcı deneyimini artırmak için özgün UI/UX Tasarım çözümleri sunuyoruz.
Hızlı ve güvenli kurulum için WordPress hizmetimizden faydalanın.
Sitenizi arama motorlarında yükseltmek için Google Optimizasyon hizmeti sunuyoruz.
Markanızı tanıtmak için Tanıtım Yazısı içerikleri üretiyoruz.
UGC ile içerik gücünüzü artırın: UGC İçerik.
Profesyonel Yazılım Kurulum hizmetleri sunuyoruz.
Kaliteli içerik arayanlara özel Hazır Makale & İçerik Satışları.
Sıra Bulucu ile arama motoru sıralamanızı takip edin.
Google Haritalara Kayıt ile konumunuzu haritada gösterin.
Alan adı otoritenizi öğrenin: DA PA Sorgula.
Dış bağlantılarınızı analiz edin: Dış Link Aracı.
Dahili link yapınızı inceleyin: İç Link Aracı.
Arama motoru başarınızı artırmak için SEO Danışmanlığı alın.
Organik trafiğinizi artırmak için SEO çözümleri geliştirin.
Özel çözümler için Mobil Uygulama geliştirme hizmeti sunuyoruz.
Markanız için Logo tasarlıyoruz.
İşinize özel Web Yazılım çözümleri sunuyoruz.
Kurumsal imajınızı yansıtan Kurumsal Web Tasarım hizmeti.
Süreçlerinizi hızlandırmak için Bot Program geliştiriyoruz.
Online satışlarınız için Sanal POS sistemleri sunuyoruz.
Entegrasyonlar için Pazaryeri ve Kargo Entegrasyonu.
Kullanıcı deneyimi testleri için Son Kullanıcı Testleri.
İçerik indirimi için TikTok Video İndir aracı.
Görsellerinizi kolayca küçültün: Resim Boyutlandırma.
Yararlı kod örnekleri için Site Kodları rehberine göz atın.
Kodları online inceleyin: HTML Viewer.
IP adresinizi öğrenmek için IP Adresim Nedir aracını kullanın.
Bağlantı hızınızı test etmek için Hız Testi.
DNS önbellek sorunları için DNS Cache Problemi sayfasını inceleyin.
DNS değişikliklerini görmek için DNS Önizleme aracı.
IDN dönüştürme için IDN Çevirme kullanın.
Sunuculara ping atmak için Ping Gönder özelliğini deneyin.
Web sitenizin yanıt süresini test etmek için Web Site Ping aracımızı kullanın.