The Technology Knowledge Base
  • Home
  • Tutorials
    • Apple
      • Mac OSX
    • Microsoft
      • Windows
        • Windows Vista
        • Windows 7
        • Windows 8 / 8.1
        • Windows 10
      • Server
        • Server 2008
        • Server 2012
        • Active Directory
        • Group Policy
        • WSUS
        • MDT
      • Exchange
        • MS Exchange 2010
        • MS Exchange 2013
    • Linux
      • pfSense
      • Ubuntu
    • Internet
      • CMS
        • WordPress
      • Web Browsers
        • Firefox
        • Google Chrome
        • Internet Explorer
      • Web Hosting
        • AWServer
        • cPanel
        • Sentora Control Panel
  • About this Site
    • Our Authors
    • How to Support US
Select Page

301 redirect with .htaccess file

To redirect a domain permanently with the .htaccess file follow the guide below.

Add the following code to your .htaccess file make sure to change yoururl.com first!

# User Added 301
RewriteCond %{HTTP_HOST} ^yoururl.com
RewriteRule ^(.*)$ http://www.yoururl.com/$1 [R=301,L]
# End of user added 301

Adam Young
waterviewtech.com.au

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)

Related

Recent Posts

  • Configure email forwarding in Outlook Web Access (Exchange 2013)

    Configure email forwarding in Outlook Web Access (Exchange 2013)

    February 2, 2018
  • Sentora – How to permanently redirect a domain (301)

    Sentora – How to permanently redirect a domain (301)

    February 18, 2017
  • Windows 10 – How to Turn off Cortana

    Windows 10 – How to Turn off Cortana

    July 30, 2016
  • Windows 10 – Disable Flash in Edge browser

    Windows 10 – Disable Flash in Edge browser

    July 30, 2016
  • Windows 10 – Disable Tablet Mode

    Windows 10 – Disable Tablet Mode

    July 29, 2016
  • RSS

Designed by Elegant Themes | Powered by WordPress