{"id":8378,"date":"2024-04-25T12:42:58","date_gmt":"2024-04-25T12:42:58","guid":{"rendered":"https:\/\/www.infinitivehost.com\/knowledge-base\/?p=8378"},"modified":"2024-04-25T12:43:00","modified_gmt":"2024-04-25T12:43:00","slug":"guide-serving-index-html-directly-on-root-domain-with-namecheap-hosting-and-bitbucket","status":"publish","type":"post","link":"https:\/\/www.infinitivehost.com\/knowledge-base\/guide-serving-index-html-directly-on-root-domain-with-namecheap-hosting-and-bitbucket\/","title":{"rendered":"Guide: Serving index.html Directly on Root Domain with Namecheap Hosting and Bitbucket"},"content":{"rendered":"<div class='epvc-post-count'><span class='epvc-eye'><\/span>  <span class=\"epvc-count\"> 2,117<\/span><span class='epvc-label'> Views<\/span><\/div>\n<p class=\"wp-block-paragraph\">To serve the <code>index.html<\/code> file directly on the root domain with Namecheap hosting and Bitbucket, you typically need to follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Configure Bitbucket Repository:<\/strong><br>Make sure your <code>index.html<\/code> file is in the root directory of your Bitbucket repository.<\/li>\n\n\n\n<li><strong>Set Up a Bitbucket Pipeline:<\/strong><br>Use Bitbucket Pipelines to automatically deploy your code to your hosting environment whenever changes are made to the repository. You&#8217;ll need to configure a <code>bitbucket-pipelines.yml<\/code> file in your repository to define the deployment steps.<\/li>\n\n\n\n<li><strong>Choose a Deployment Method:<\/strong><br>Decide on the method you want to use to deploy your code to your Namecheap hosting environment. You can use FTP, SSH, or other deployment methods supported by Namecheap.<\/li>\n\n\n\n<li><strong>Configure Deployment Settings:<\/strong><br>Set up the deployment settings in your Bitbucket Pipeline configuration file (<code>bitbucket-pipelines.yml<\/code>) to deploy the <code>index.html<\/code> file to the root directory of your hosting environment.<\/li>\n\n\n\n<li><strong>Test and Deploy:<\/strong><br>Test your Bitbucket Pipeline configuration to ensure that it deploys the <code>index.html<\/code> file correctly to your hosting environment. Once everything is set up properly, any changes made to the <code>index.html<\/code> file in your Bitbucket repository should automatically be deployed to your hosting environment.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s a basic example of what your <code>bitbucket-pipelines.yml<\/code> file might look like for deploying to Namecheap hosting using FTP:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this example:<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-red-color has-text-color has-link-color wp-elements-652525156967924480bc3c2c3bcf639f\"><code><code># bitbucket-pipelines.yml\n\npipelines:\n  default:\n    - step:\n        name: Deploy to Namecheap Hosting\n        deployment: production\n        script:\n          - apt-get update &amp;&amp; apt-get install -y lftp\n          - lftp -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST -e \"set ssl:verify-certificate no; mirror -R .\/ \/public_html; quit\"<\/code><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Replace <code>$FTP_USERNAME<\/code>, <code>$FTP_PASSWORD<\/code>, and <code>$FTP_HOST<\/code> with your actual FTP credentials and hostname provided by Namecheap.<\/li>\n\n\n\n<li>This script will use <code>lftp<\/code> to upload your files to the <code>\/public_html<\/code> directory on your hosting environment.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Please note that the exact steps may vary depending on your specific hosting setup and deployment preferences. Make sure to refer to the documentation provided by Namecheap and Bitbucket for more detailed instructions tailored to your setup.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2,117 Views To serve the index.html file directly on the root domain with Namecheap hosting and Bitbucket, you typically need to follow these steps: Here&#8217;s a basic example of what your bitbucket-pipelines.yml file might look like for deploying to Namecheap hosting using FTP: In this example: Please note that the exact steps may vary depending [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[58],"tags":[],"class_list":["post-8378","post","type-post","status-publish","format-standard","hentry","category-hosting"],"_links":{"self":[{"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/8378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/comments?post=8378"}],"version-history":[{"count":2,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/8378\/revisions"}],"predecessor-version":[{"id":8389,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/8378\/revisions\/8389"}],"wp:attachment":[{"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=8378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/categories?post=8378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/tags?post=8378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}