I've seen a few sites, not necissarily Drupal sites, in which the menu links, are without www. (that is the Cname DNS record).

Drupal 7 shortens links from http://www.barackobama.com to be www.barackobama.com

I am asking if it is possible to create links without the Cname even, I.E that the final result would be:


Can be done from inside the Drupal GUI? If not, please at least example how will you do so from the .htaccess file?

1 Answer 1


No, this is something that is been handle at the server or DNS level. From the GUI, you do not have control of where you application (Drupal) can will run.

If you are running Apache you can add this code to your .htaccess

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

Source: Force drupal 7 to place "www" in front of urls

  • How will you do so from the .htaccess (Hope it's okay by you, that I ask here to expand your answer with that data)...
    – user16289
    Feb 20, 2016 at 19:57
  • 1
    Benia, I have added the information on how to do it from the .htaccess. Feb 22, 2016 at 17:47

Your Answer

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