Jump to content

How to get yourshopname.com to www.yourshopname.com?


Recommended Posts

I had created the website on my localhost, now I've gone live with it. The issue I'm facing is when I'm typing yourshopname.com it opens the website and when I type www.yourshopname.com it shows 

This webpage is not available 

I've tired changing htaccess file also but no hope, I've also tired changing url in from Back-end in SEO and URL's option. Still no Hope.

 

I'm running PrestaShop™ 1.6.0.13

Please Help.

Link to comment
Share on other sites

Try adding the following to the top of your .htaccess file to redirect from yourshopname.com to www.yourshopname.com:

<IfModule mod_rewrite.c>
RewriteEngine on    
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
</IfModule>

Or add the following instead to redirect from www.yourshopname.com to yourshopname.com:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
</IfModule>



			
		
Link to comment
Share on other sites

That should have worked. I don't understand why it isn't.

 

The only other suggestion I have is to set up a redirect in cPanel instead. I'm using Just Host and when I log in, I see a "Redirects" in the "Domain Management" section. It looks like there's options in there that might do what you want.

 

Alternatively, you could try to ask your host for help. They might know why it is happening.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...