I designed and uploaded a site on a mobile format. It shows up fine but ONLY if I type out the http://
.
The client wants it to be as simple as possible. How can I have it automatically insert the http://www.
?
Webmasters Stack Exchange is a question and answer site for pro webmasters. It only takes a minute to sign up.
Sign up to join this communityIt seems you are not managing URL redirects properly.
Firstly you will have to decide your preferred URL. And then you will also need to make sure other versions of URL should automatically redirect to preferred URL.
Example: Preferred URL: https://www.example.com
Then you need to make sure your other versions of URL automatically redirects to preferred URL like:
http:example.com
http://www.example.com
https://example.com
In Apache hosting, you can easily manage by adding few lines of code in the .htaccess file.
Edited: Following code can be used on Apache server to achieve above.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
RewriteCond %{http_host} ^example.com [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ https://www.example.com/$1 [R=301,L]
http://
doesn't sound like a "managing URL redirects" issue. This sounds more like a browser usage problem?!
– MrWhite
Apr 28 '18 at 21:40
http://www
? Is it different for other sites on the device you are testing with? – Stephen Ostermiller♦ Apr 27 '18 at 19:56http://example.com/
andhttp:/www.example.com/
both work when fully typed out, you have DNS set up properly. It is browsers that add thehttp://
in automatically. – Stephen Ostermiller♦ Apr 27 '18 at 20:00