WordPress web का 43% power करता है। SSL/HTTPS add करने में तीन steps शामिल हैं: certificate get करें, इसे अपने server पर install करें, और WordPress को HTTPS URLs use करने के लिए update करें। यह guide तीनों को cover करती है।
Step 1: Certificate Get करें
ज्यादातर WordPress hosts free SSL include करते हैं — पहले check करें:
| Host Type | कैसे Check करें |
|---|---|
| Managed WordPress (SiteGround, Bluehost, WP Engine) | Control panel → Security/SSL section — अक्सर auto-enabled |
| cPanel Shared Hosting | cPanel → SSL/TLS Status — AutoSSL देखें |
| VPS/Dedicated | कोई built-in SSL नहीं — आपको खुद install करना होगा |
अगर आपका host SSL provide नहीं करता, तो GetHTTPS से free certificate get करें और इसे cPanel, Nginx, या Apache के through install करें।
Step 2: WordPress URLs Update करें
Server पर certificate install होने के बाद, WordPress को HTTPS use करने के लिए बताएं:
Method A: WordPress Settings (सबसे Easy)
- Settings → General पर जाएं
- दोनों URLs को
http://सेhttps://में change करें:- WordPress Address (URL):
https://yourdomain.com - Site Address (URL):
https://yourdomain.com
- WordPress Address (URL):
- Save Changes पर click करें
आप log out हो जाएंगे — नए https:// URL पर वापस log in करें।
Method B: wp-config.php (अगर आप Dashboard Access नहीं कर सकते)
/* That's all, stop editing! */ से पहले add करें:
define('WP_HOME', 'https://yourdomain.com');
define('WP_SITEURL', 'https://yourdomain.com');
define('FORCE_SSL_ADMIN', true);
Step 3: Mixed Content Fix करें
WordPress database में absolute URLs store करता है (post content, images, widget text)। HTTPS पर switch करने के बाद, पुराने http:// references mixed content warnings देते हैं।
Quick Fix: Really Simple SSL Plugin
- Really Simple SSL plugin install करें
- इसे activate करें — यह आपके certificate detect करता है और ज्यादातर mixed content automatically fix करता है
- यह
upgrade-insecure-requestsheader add करता है और URLs dynamically rewrite करता है
Permanent Fix: Database में Search-Replace
Plugin dependency के बिना clean solution के लिए:
# Using WP-CLI (recommended)
wp search-replace 'http://yourdomain.com' 'https://yourdomain.com' --all-tables
या Better Search Replace plugin use करें:
- Search for:
http://yourdomain.com - Replace with:
https://yourdomain.com - सभी tables select करें
- Run करें (पहले dry run करें)
Manual SQL (Advanced)
UPDATE wp_options SET option_value = REPLACE(option_value, 'http://yourdomain.com', 'https://yourdomain.com') WHERE option_name IN ('home', 'siteurl');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://yourdomain.com', 'https://yourdomain.com');
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'http://yourdomain.com', 'https://yourdomain.com');
Step 4: HTTP → HTTPS Redirect Set करें
Ensure करें कि सभी visitors को HTTPS serve किया जाए, भले ही वे http:// type करें:
.htaccess (Apache — WordPress के लिए सबसे Common)
अपनी .htaccess file के top पर add करें (WordPress rules से पहले):
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Nginx
server {
listen 80;
server_name yourdomain.com www.yourdomain.com;
return 301 https://$host$request_uri;
}
हमारी full redirect guide देखें।
Step 5: External Services Update करें
HTTPS पर migrate करने के बाद, इनमें अपने URLs update करें:
- Google Search Console —
https://property add करें - Google Analytics — Settings → Default URL →
https://में change करें - Sitemap —
https://URLs के साथ regenerate करें (Yoast/Rank Math यह automatically करता है) - Social profiles — Facebook, Twitter links आपकी site से
- CDN — अगर CDN use कर रहे हैं, तो ensure करें कि यह HTTPS पर serve करे
Verify करें
https://yourdomain.comपर जाएं — padlock icon दिखना चाहिए- DevTools (F12) → Console खोलें — mixed content warnings check करें
- कुछ internal pages और blog posts test करें
- Google Search Console में किसी भी crawl errors check करें
Troubleshooting
HTTPS Enable करने के बाद Redirect Loop
Proxy (Cloudflare, load balancer) के behind होने पर common। Proxy WordPress को HTTP भेजता है, जो HTTPS पर redirect करता है, जिसे proxy फिर से HTTP के रूप में भेजता है। Fix:
// Add to wp-config.php if behind a proxy
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
}
SSL Install करने के बाद “Your connection is not private”
Certificate server level पर properly installed नहीं हो सकता है। WordPress troubleshoot करने से पहले server configuration (Nginx या Apache) check करें।
कुछ Images/Resources अभी भी HTTP पर Load हो रहे हैं
Database search-replace (Step 3) run करें। Hardcoded http:// URLs के लिए theme files और custom CSS check करें। Safety net के रूप में upgrade-insecure-requests CSP header use करें।
FAQ
क्या मुझे WordPress पर SSL के लिए plugin की need है?
नहीं। Really Simple SSL जैसा plugin transition easy बनाता है (especially mixed content), लेकिन यह required नहीं है। आप URLs manually update कर सकते हैं और .htaccess में redirect add कर सकते हैं। Plugin हर page load पर थोड़ा overhead add करता है।
HTTPS पर switch करने से क्या मेरा SEO affect होगा?
Temporarily, Google आपकी site re-crawl करते समय minor ranking fluctuations हो सकते हैं। Long term में, HTTPS SEO improve करता है — यह Google ranking signal है। HTTP से HTTPS के लिए 301 redirects use करें ताकि link equity transfer हो।
क्या मैं WordPress के साथ free Let’s Encrypt certificate use कर सकता हूं?
हां। Let’s Encrypt certificates किसी भी website के साथ काम करते हैं, WordPress included। GetHTTPS से एक get करें और इसे अपने server पर या cPanel के through install करें। Certificate को पता नहीं होता और न ही care करता है कि WordPress इसके behind run हो रहा है।
WordPress के लिए certificate कैसे renew करें?
Certificate server level पर installed होता है, WordPress में नहीं। नया certificate get करके और अपने server पर files replace करके इसे renew करें। WordPress खुद certificates manage नहीं करता।
WooCommerce / WordPress पर e-commerce के बारे में क्या?
WooCommerce के लिए free Let’s Encrypt DV certificate enough है। PCI DSS को OV या EV certificates required नहीं — इसे encryption required है, जो DV provide करता है। आपका payment gateway (Stripe, PayPal, Square) वैसे भी सबसे sensitive payment card data handle करता है।
क्या मैं WordPress Multisite के साथ SSL use कर सकता हूं?
हां। Subdomains वाले WordPress Multisite (जैसे, site1.example.com, site2.example.com) के लिए, wildcard certificate (*.example.com) use करें। Subdirectory वाले Multisite (जैसे, example.com/site1/) के लिए, single domain certificate काम करता है।
मेरा host कहता है कि वे free SSL provide करते हैं — क्या मुझे अभी भी GetHTTPS की need है?
अगर आपका host free SSL provide करता है (AutoSSL या similar system के through), तो इसे use करें — यह सबसे simple path है। GetHTTPS उन cases के लिए है जब आपका host free SSL नहीं देता, आपको एक specific certificate type (wildcard, multi-domain) की need है, या आप private key खुद control करना चाहते हैं।