🔒
SEO & marketing

Moving to HTTPS without losing traffic: what to watch for

04.12.2026
← All articles

HTTPS is now a baseline requirement. Browsers label HTTP pages "Not secure", and Google uses HTTPS as one of its page experience signals. Still, many owners fear the switch because they have heard of traffic dropping afterwards. In reality traffic is lost not because of HTTPS but because of technical mistakes during the move.

What the switch means to Google

To a search engine, http://example.uz/prices and https://example.uz/prices are different URLs. Google needs to learn the HTTPS address of every HTTP page and move signals across, which happens through 301 redirects and canonical tags. The domain does not change, so the Change of Address tool is not used here. With complete redirects, Google usually swaps indexed URLs to HTTPS within a few weeks, and a mix of HTTP and HTTPS results in the meantime is normal.

Install the certificate correctly

The certificate must cover both the bare domain and www, or https://www.example.uz will show an error. Let's Encrypt certificates are free and last 90 days, so automatic renewal is essential; on sayt.uz hosting it is enabled from the cabinet and renews itself. Check what the certificate covers:

echo | openssl s_client -connect example.uz:443 -servername example.uz 2>/dev/null \
  | openssl x509 -noout -subject -ext subjectAltName -dates

The subjectAltName line should list both example.uz and www.example.uz.

One site-wide 301

Once the certificate works, redirect every HTTP request to HTTPS permanently, keeping the path and resolving www in the same hop. Redirecting only the homepage is a frequent mistake.

RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^ https://example.uz%{REQUEST_URI} [L,R=301]

Test inner pages: curl -sI http://example.uz/prices should return one 301 to https://example.uz/prices. Behind a proxy like Cloudflare, use "Full (strict)" SSL mode or you will get a redirect loop.

Find and fix mixed content

When an HTTPS page loads images, scripts or styles over HTTP, that is mixed content. Browsers block such scripts and upgrade or warn about images, so pages break and the padlock disappears. A quick way to find it:

curl -s https://example.uz/ | grep -oE '(src|href)="http://[^"]+"' | sort -u

The browser's developer Console also lists mixed content warnings. Change those URLs to HTTPS or relative paths. A Content-Security-Policy: upgrade-insecure-requests header can help temporarily but does not replace fixing the links.

Old URLs in the WordPress database

WordPress stores HTTP URLs in post content, image links, menus and widgets, so changing the site address in settings is not enough. WP-CLI handles serialized data safely. Back up first.

wp db export backup-before.sql
wp search-replace 'http://example.uz' 'https://example.uz' --skip-columns=guid --dry-run
wp search-replace 'http://example.uz' 'https://example.uz' --skip-columns=guid

--dry-run shows how many replacements would be made without changing anything. Leaving the guid column untouched follows WordPress guidance.

Example: a hotel site in Bukhara

A small hotel in Bukhara had a booking form, and guests hesitated to enter details next to the "Not secure" label. After the certificate was installed, the homepage showed a padlock but room pages lost their photos, because the gallery plugin stored full HTTP URLs. Running WP-CLI search-replace fixed that. The team then enabled the site-wide 301, regenerated the sitemap with HTTPS URLs, submitted it to Search Console and updated links in booking services and the Google Maps listing. Results mixed old and new URLs for two weeks, then traffic settled at its previous level and fewer guests abandoned the form.

After the switch

Once everything is stable, consider HSTS, which tells browsers to use HTTPS only. Start small, for example Strict-Transport-Security: max-age=300, and raise it gradually. A long HSTS period is hard to undo: browsers remember it, and a certificate problem would make the site unreachable.

Related articles

🎯 Setting up conversions in GA4: leads, calls and purchases 🗺️ Adding Your Business to 2GIS and What It Does for SEO 🔎 Bing SEO: Why It Matters for ChatGPT Search ✍️ Making AI Text Useful: Add Experience, Real Numbers and Examples
🌐 Language
🇺🇿 O⁠'zbek 🇺🇿 Özbek (yangi) 🇺🇿 Ўзбек 🇷🇺 Русский 🇬🇧 English ✓