7

I'm hosting my website on Google App Engine and my domain name on GoDaddy.

Google App Engine does not allow you to have naked URLs. So it doesn't allow you to have example.com but does allow you to have www.example.com.

I can easily enable forwarding in GoDaddy to forward exmample.com to www.example.com however it does not keep the relative URL path.

For example I would like for example.com/images/3.jpg to be forwarded to www.example.com/images/3.jpg and not just www.example.com.

3 Answers 3

4

If anyone's coming here from a search result after struggling with this issue, GoDaddy have officially said (as of 2018-07-16) that their domain forwarding no longer supports URL paths.

Our forwarding service does not work with URL paths, unfortunately. If you want to redirect and match a path, you would need to point the domain to a hosting plan and then do a 301 or 302 redirect there. Perhaps the IP you're forwarding to can be instead set up to host your domain, so you do not need to do the forward.

https://uk.godaddy.com/community/Managing-Domains/Domain-forwarding-path-being-lost/td-p/111686

2

GoDaddy's forwarding feature does preserve paths. I have a .org domain registered with GoDaddy and forwarded to the corresponding .com domain. Paths are preserved.

I use the following forwarding options:

  • Redirect type: 301 permanent
  • Forward settings: forward only
4
  • I think I recall this being a problem in the past, but working now, providing you don't select "Forward with Masking".
    – dan
    Commented Nov 23, 2013 at 0:40
  • 1
    I have this setup on my domain and works for my main URL, but a redirect / forward will not keep the relative path of the original link.
    – JoeFletch
    Commented Jul 19, 2015 at 13:38
  • @JoeFletch Forwarding for me does keep the URL path. For example I have ostermiller.com set up to forward using GoDaddy to ostermiller.org. ostermiller.com/utils forwards as expected to the corresponding page on the .org domain. Commented Jul 20, 2015 at 20:51
  • @StephenOstermiller thanks for your reply! It took a few hours for the change to be implemented. All is working as expected now!
    – JoeFletch
    Commented Jul 21, 2015 at 18:22
0

Why don't you just use .htaccess?

Create a text file and copy and paste the following inside:

# Force 'non-www' to 'www'
RewriteEngine On
RewriteCond %{HTTP_HOST} ^YOURDOMAIN.com [NC]
RewriteRule ^(.*)$ http://www.YOURDOMAIN.com/$1 [L,R=301] 
  1. rename it to ".htaccess"
  2. upload it to your public_html folder where index.php is located
1
  • 1
    The hosting is on Google App engine, which doesn't have the concept of a public_html folder. Commented Dec 16, 2011 at 15:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.