{"id":285,"date":"2011-11-03T14:34:27","date_gmt":"2011-11-03T14:34:27","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2011\/11\/03\/what-is-the-htaccess-file-and-what-do-i-use-it-for\/"},"modified":"2025-02-06T12:31:23","modified_gmt":"2025-02-06T17:31:23","slug":"htaccess-file","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/","title":{"rendered":"How to Use the .htaccess File"},"content":{"rendered":"<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2011\/11\/htaccess-file-1024x538.png\" alt=\"How to Use the .htaccess File\" class=\"wp-image-129263\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2011\/11\/htaccess-file-1024x538.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2011\/11\/htaccess-file-300x158.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2011\/11\/htaccess-file-768x403.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2011\/11\/htaccess-file.png 1200w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p>The <code>.htaccess<\/code> file is a powerful tool that helps control how visitors interact with your website. It can be used for security, redirects, URL rewriting, and more. In this guide, we\u2019ll cover what the <code>.htaccess<\/code> file does, where to find it, how to edit it, and how to troubleshoot errors it may cause.<a name=\"what\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is the .htaccess File?<\/h2>\n\n\n\n<p>The <code>.htaccess<\/code> file is a hidden configuration file used on Linux-based web servers, including InMotion Hosting\u2019s Shared Hosting accounts. It allows you to make quick changes to how your site functions without modifying the main server configuration.<\/p>\n\n\n\n<p>Since <code>.htaccess<\/code> directly impacts how your website functions, <strong>always back up your <code>.htaccess<\/code> file before making changes.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Where is My .htaccess File? <\/h2>\n\n\n\n<p>By default, the <code>.htaccess<\/code> file is located in your website\u2019s root directory:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"\/home\/yourusername\/public_html\/.htaccess\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DBEDFF\">\/home\/<\/span><span style=\"color: #E1E4E8\">yourusername<\/span><span style=\"color: #DBEDFF\">\/public_html\/<\/span><span style=\"color: #E1E4E8\">.htaccess<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Because it\u2019s a hidden file, you\u2019ll need to enable the <strong>Show Hidden Files<\/strong> option in cPanel\u2019s File Manager to see it.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"jetpack-video-wrapper\"><div class=\"yt-4nTbUxi4V6Y\">\n\t<a class=\"play-video-4nTbUxi4V6Y\" style=\"position: relative; display: flex; flex-wrap: wrap; align-items: center; cursor: pointer;\">\n\t\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i.ytimg.com\/vi_webp\/4nTbUxi4V6Y\/maxresdefault.webp\" width=\"1280\" height=\"720\" alt=\"How to Edit Your .htaccess File using cPanel File Manager and FTP Clients\" style=\"width: 100%; height: auto;\">\n\t\t<span class=\"fa fa-imh-play-circle imh-ds-icon play-circle\" style=\"position: absolute; display:block; font-size:150px; color: #c52228; opacity:0;\"><\/span>\n\t<\/a>\n<\/div><\/div>\n<\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">How to Locate and Edit .htaccess in cPanel<\/h3>\n\n\n\n<ol class=\"wp-block-list article_list\">\n<li><strong>Log in to cPanel.<\/strong><\/li>\n\n\n\n<li>Click <strong>File Manager<\/strong> under the <strong>Files<\/strong> section.<\/li>\n\n\n\n<li>In the top-right corner, click <strong>Settings<\/strong> and check the box for <strong>Show Hidden Files (dotfiles).<\/strong> Click <strong>Save.<\/strong><\/li>\n\n\n\n<li>Navigate to the <code>public_html<\/code> directory and locate the <code>.htaccess<\/code> file.<\/li>\n\n\n\n<li>Right-click the file and select <strong>Edit.<\/strong><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">How to Create a .htaccess File (If Missing)<\/h3>\n\n\n\n<p>If you don\u2019t see a <code>.htaccess<\/code> file in <code>public_html<\/code>:<\/p>\n\n\n\n<ol class=\"wp-block-list article_list\">\n<li>In <strong>File Manager<\/strong>, click <strong>+File<\/strong> in the top-left corner.<\/li>\n\n\n\n<li>Name the file <strong>.htaccess<\/strong> (with the dot at the beginning).<\/li>\n\n\n\n<li>Set the directory to <code>\/public_html\/<\/code> or your website\u2019s document root.<\/li>\n\n\n\n<li>Click <strong>Create File<\/strong>, then right-click it and select <strong>Edit<\/strong>.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what\">What Can You Do With a .htaccess File?<\/h2>\n\n\n\n<p>The <code>.htaccess<\/code> file offers a wide range of functions, including:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"https:\/\/www.inmotionhosting.com\/support\/website\/setting-up-a-301-permanent-redirect-via-htaccess\/\">Redirecting URLs<\/a><\/strong> \u2013 Forward visitors from one URL to another.<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/www.inmotionhosting.com\/support\/website\/password-single-file-htaccess\/\">Password-Protecting Directories<\/a><\/strong> \u2013 Restrict access to certain areas of your website.<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/www.inmotionhosting.com\/support\/website\/using-the-ip-deny-manager\/\">Blocking Specific Traffic<\/a><\/strong> \u2013 Prevent unwanted bots or users from accessing your site.<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/hotlink-protect-htaccess\/\">Preventing Hotlinking<\/a><\/strong> \u2013 Stop other websites from embedding your images or files.<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-change-index-page\/\">Setting Default Pages<\/a><\/strong> \u2013 Specify which file (e.g., <code>index.html<\/code> or <code>index.php<\/code>) loads first in a directory.<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/www.inmotionhosting.com\/support\/website\/force-download-htaccess\/\">Forcing File Downloads<\/a><\/strong> \u2013 Make certain files download instead of opening in the browser.<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/www.inmotionhosting.com\/support\/website\/set-custom-404-page\/\">Customizing Error Pages<\/a><\/strong> \u2013 Set up custom 404 or 500 error pages.<\/li>\n\n\n\n<li><strong>Rewriting URLs<\/strong> \u2013 Improve SEO by creating clean, user-friendly URLs.<\/li>\n<\/ul>\n\n\n\n<p>Many of these settings can be configured automatically through cPanel, but advanced users can edit <code>.htaccess<\/code> directly for more customization.<a name=\"troubleshooting\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"troubleshooting\">Troubleshooting .htaccess Errors<\/h2>\n\n\n\n<p>Since <code>.htaccess<\/code> controls many aspects of your website, incorrect configurations can cause errors. If your website isn\u2019t loading correctly, try these steps:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Temporarily Disable .htaccess<\/h3>\n\n\n\n<p>You can check if the <code>.htaccess<\/code> file is causing an issue by renaming it:<\/p>\n\n\n\n<ol class=\"wp-block-list article_list\">\n<li>In <strong>File Manager<\/strong>, right-click <code>.htaccess<\/code> and select <strong>Rename<\/strong>.<\/li>\n\n\n\n<li>Change the filename to <code>.htaccess.old<\/code> and save.<\/li>\n\n\n\n<li>Reload your website.<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>If the site loads correctly,<\/strong> an error in <code>.htaccess<\/code> was the problem.<\/li>\n\n\n\n<li><strong>If the issue persists,<\/strong> rename the file back to <code>.htaccess<\/code> and continue troubleshooting.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. Check for PHP Configuration Issues<\/h3>\n\n\n\n<p>If your PHP settings aren\u2019t applying correctly, you may need to make your <code>php.ini<\/code> file recursive. See our full guide: <a href=\"https:\/\/www.inmotionhosting.com\/support\/website\/recursive-php-ini\/\">How to Make php.ini Recursive<\/a>.<\/p>\n\n\n<div class=\"jumbotron\" style=\"text-align:center;\">\r\n<p style=\"font-size: 20px;\"><strong>Reliable Shared Hosting for Growing Businesses<\/strong><\/p>\r\n<p>Get the performance your business website demands with NVMe SSD storage, industry-standard cPanel management, and direct access to hosting experts whenever you need assistance.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Free Website Migration &nbsp;&nbsp;&nbsp; <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>24\/7 Human Support &nbsp;&nbsp;&nbsp; <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>100% Money-Back Guarantee<\/p>\r\n<p><a class=\"btn btn-primary btn-lg\" href=\"https:\/\/www.inmotionhosting.com\/shared-hosting?mktgp=t&irgwc=1&affiliates=5001860&utm_campaign=Jumbotron&utm_source=supportcenter&utm_medium=cta&utm_term=shared-cta2\">Shared Hosting<\/a><\/p>\r\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Final Thoughts<\/h2>\n\n\n\n<p>The <code>.htaccess<\/code> file is an essential part of website management, allowing you to control redirects, security settings, and more. Always back up your <code>.htaccess<\/code> file before making changes, and if you run into issues, try renaming the file to troubleshoot errors.<\/p>\n\n\n\n<p>Need more help? Check out our <a href=\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-reference-list\/\">full .htaccess reference guide<\/a> for advanced configurations.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The .htaccess file is a powerful tool that helps control how visitors interact with your website. It can be used for security, redirects, URL rewriting, and more. In this guide, we\u2019ll cover what the .htaccess file does, where to find it, how to edit it, and how to troubleshoot errors it may cause. What is<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/\"> Read More ><\/a><\/p>\n","protected":false},"author":57032,"featured_media":129263,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4288],"tags":[],"class_list":["post-285","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-website"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is an .htaccess file and how do I use it? | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"Learn what an .htaccess file is and what you can do with it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is an .htaccess file and how do I use it? | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"Learn what an .htaccess file is and what you can do with it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2011-11-03T14:34:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-06T17:31:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2011\/11\/htaccess-file.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Derrell\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Derrell\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/\"},\"author\":{\"name\":\"Derrell\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/0736f70b4077032374f89709cdc255b7\"},\"headline\":\"How to Use the .htaccess File\",\"datePublished\":\"2011-11-03T14:34:27+00:00\",\"dateModified\":\"2025-02-06T17:31:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/\"},\"wordCount\":557,\"commentCount\":27,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2011\/11\/htaccess-file.png\",\"articleSection\":[\"Website\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/\",\"name\":\"What is an .htaccess file and how do I use it? | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2011\/11\/htaccess-file.png\",\"datePublished\":\"2011-11-03T14:34:27+00:00\",\"dateModified\":\"2025-02-06T17:31:23+00:00\",\"description\":\"Learn what an .htaccess file is and what you can do with it.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/#primaryimage\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2011\/11\/htaccess-file.png\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2011\/11\/htaccess-file.png\",\"width\":1200,\"height\":630,\"caption\":\"How to Use the .htaccess File\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use the .htaccess File\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/0736f70b4077032374f89709cdc255b7\",\"name\":\"Derrell\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/derrell-willis\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/derrellw\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is an .htaccess file and how do I use it? | InMotion Hosting","description":"Learn what an .htaccess file is and what you can do with it.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/","og_locale":"en_US","og_type":"article","og_title":"What is an .htaccess file and how do I use it? | InMotion Hosting","og_description":"Learn what an .htaccess file is and what you can do with it.","og_url":"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2011-11-03T14:34:27+00:00","article_modified_time":"2025-02-06T17:31:23+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2011\/11\/htaccess-file.png","type":"image\/png"}],"author":"Derrell","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Derrell","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/"},"author":{"name":"Derrell","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/0736f70b4077032374f89709cdc255b7"},"headline":"How to Use the .htaccess File","datePublished":"2011-11-03T14:34:27+00:00","dateModified":"2025-02-06T17:31:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/"},"wordCount":557,"commentCount":27,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2011\/11\/htaccess-file.png","articleSection":["Website"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/","url":"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/","name":"What is an .htaccess file and how do I use it? | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/#primaryimage"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2011\/11\/htaccess-file.png","datePublished":"2011-11-03T14:34:27+00:00","dateModified":"2025-02-06T17:31:23+00:00","description":"Learn what an .htaccess file is and what you can do with it.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/#primaryimage","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2011\/11\/htaccess-file.png","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2011\/11\/htaccess-file.png","width":1200,"height":630,"caption":"How to Use the .htaccess File"},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htaccess-file\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Use the .htaccess File"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/0736f70b4077032374f89709cdc255b7","name":"Derrell","sameAs":["https:\/\/www.linkedin.com\/in\/derrell-willis"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/derrellw\/"}]}},"jetpack_featured_media_url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2011\/11\/htaccess-file.png","jetpack_sharing_enabled":true,"primary_category":{"id":4288,"name":"Website","slug":"website","link":"https:\/\/www.inmotionhosting.com\/support\/website\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/57032"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=285"}],"version-history":[{"count":16,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/285\/revisions"}],"predecessor-version":[{"id":129264,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/285\/revisions\/129264"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media\/129263"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}