"www" Removal

  • 1
  • Question
  • Updated 8 years ago
  • Answered
Could you please remove "www" from http://codclan.contactjames.tk
If this isn't removed my site does not work
And please do not tell me to email support@yola.com
I've been emailing them since Friday and its still not fixed
Photo of James

James

  • 75 Posts
  • 2 Reply Likes

Posted 8 years ago

  • 1
Photo of Marije

Marije, Official Rep

  • 4636 Posts
  • 237 Reply Likes
Hi James - I'll get one of our engineers to fix this for you and let you know when it has been done.
Photo of Bri

Bri

  • 21 Posts
  • 2 Reply Likes
Hi James,

I know that it can be hard to find answers to all of these questions, especially when you want a quick fix. I am sure that the Yola team has not overlooked your question, instead, they are finding a way to correctly answer it.

I have done some research on this topic and have some suggestions for you. You will need to do a .htaccess rewrite on your web page. Please follow the instructions below. There are a few different suggestions for you to try.

I hope this helps,

Bri

Add the following to your .htaccess file of your Apache web server, which will rewrite the URL removing www part.

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

PHP / WordPress

If you do not have access to htaccess file, copy the PHP code to top of your wp-config.php file, and replace yourdomain.com with your domain name.

If you do not have access to wp-config.php, you can add these lines on the very top of your header.php in your current theme, within the php tags. Make sure you do not put any extra space in there, which would break your RSS feed otherwise!

If you are using any other PHP CMS, you can still use this code. Just make sure that, this gets executed before any other processing.

if ( strpos($_SERVER['HTTP_HOST'], 'www.') === 0 ) {
header('HTTP/1.1 301 Moved Permanently');
header('Location: http://yourdomain.com' . $_SERVER['REQUEST_URI']);
exit();
}
Photo of Bri

Bri

  • 21 Posts
  • 2 Reply Likes
looks as though an engineer is on top of it now =)
Photo of Marije

Marije, Official Rep

  • 4636 Posts
  • 237 Reply Likes
Hey Bri - thanks for researching that! Unfortunately it won't work on Yola as you don't have access to your htaccess file. We need to make this particular change manually for you (until it's an implemented feature).
Photo of James

James

  • 75 Posts
  • 2 Reply Likes
Thanks Marije my site is up!!
And thanks bri, if only i knew how to do that lol