I recently bought a domain name from GoDaddy. I have a web server running in Google Cloud with a static IP. In the DNS configuration in GoDaddy, I added an A
record (@
-> To the static IP of the Google Cloud server) and also a CNAME record for www to point to @
.
When I go to www.my_domain_name.com
(or my_domain_name.com
), I can see my website with no issues. However, the browser shows the IP address instead of www.my_domain_name.com
.
Almost all posts on the internet suggest that I add an A
record, which is already added in my case.
Update:
Here is what I get when I issue curl -I www.mydomain.com
:
HTTP/1.1 302 Found
Date: Thu, 29 Jan 2015 08:47:43 GMT
Server: Apache/2.2.22 (Debian)
X-Powered-By: PHP/5.4.36-0+deb7u3
Set-Cookie: osclass=j20ouo6i8lvmmu88rf68j6clp7; path=/; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: http://130.211.241.199:/
Vary: Accept-Encoding
Content-Type: text/html
And this is the content of my .htaccessfile.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>