Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

freel's avatar

domain.com to www.domain.com

Hello,

my main task was to redirect domain from domain.com to www.domain.com I was flowing this post: https://www.digitalocean.com/community/tutorials/how-to-redirect-www-to-non-www-with-apache-on-ubuntu-14-04

after operation: curl -I http://amberauto.co.uk I have error....

This site can’t be reached
www.amberauto.co.uk unexpectedly closed the connection.
ERR_CONNECTION_CLOSED

How to undo this operation ? :) Thank you for your help.

0 likes
2 replies
freel's avatar
freel
OP
Best Answer
Level 8

not sure how to delete that. Situation is that after 20 min everything started work find. Not sure what was the problem.

computer-logix's avatar

What about creating a virtualhost site for domain.com with a single index.html file with the following contents?

Replace the [] with <>... The forum kept erasing my html code!

[head][meta http-equiv="refresh" content="0;url=http://www.domain.com"][/head]

It's a simple redirect to to the site www.domain.com with your laravel files. You have both domain.com and www.domain.com pointing to your public interface, right?

Please or to participate in this conversation.