<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: nikhil mahato</title>
    <description>The latest articles on DEV Community by nikhil mahato (@nikhil_mahato).</description>
    <link>https://dev.to/nikhil_mahato</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1562937%2F2a4f57ac-57bf-4ce8-aa11-47272447250c.jpeg</url>
      <title>DEV Community: nikhil mahato</title>
      <link>https://dev.to/nikhil_mahato</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nikhil_mahato"/>
    <language>en</language>
    <item>
      <title>Connecting a Custom Domain to Vercel</title>
      <dc:creator>nikhil mahato</dc:creator>
      <pubDate>Mon, 21 Jul 2025 17:05:42 +0000</pubDate>
      <link>https://dev.to/nikhil_mahato/connecting-a-custom-domain-to-vercel-46ok</link>
      <guid>https://dev.to/nikhil_mahato/connecting-a-custom-domain-to-vercel-46ok</guid>
      <description>&lt;h1&gt;
  
  
  Connecting a Custom Domain to Vercel
&lt;/h1&gt;

&lt;p&gt;If you’re using &lt;a href="https://vercel.com" rel="noopener noreferrer"&gt;Vercel&lt;/a&gt; to deploy your projects, connecting a custom domain is straightforward and only takes a few steps. Here’s a quick guide to get your domain up and running with your Vercel-hosted application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Add Your Project to Vercel
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Deploy your app to Vercel (e.g., using &lt;code&gt;vercel&lt;/code&gt; CLI or GitHub integration).&lt;/li&gt;
&lt;li&gt;Open your project dashboard on Vercel.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 2: Add Your Custom Domain
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Project Settings → Domains&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;“Add”&lt;/strong&gt; and enter your custom domain (e.g., &lt;code&gt;yourdomain.com&lt;/code&gt;).
&lt;/li&gt;
&lt;li&gt;Vercel will check if the domain is already configured. If not, it will guide you to add DNS records.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 3: Configure DNS Records
&lt;/h2&gt;

&lt;p&gt;You need to update your domain registrar's DNS settings.&lt;br&gt;&lt;br&gt;
Vercel typically requires:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A Record:&lt;/strong&gt;
Points &lt;code&gt;@&lt;/code&gt; (root domain) to Vercel’s IP:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  76.76.21.21
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CNAME Record:&lt;/strong&gt;
Points &lt;code&gt;www&lt;/code&gt; to &lt;code&gt;cname.vercel-dns.com&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx44s6sj5cz2reqo8rer1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx44s6sj5cz2reqo8rer1.png" alt=" " width="800" height="123"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you’re using a subdomain (e.g., &lt;code&gt;blog.yourdomain.com&lt;/code&gt;), add a CNAME for that subdomain pointing to &lt;code&gt;cname.vercel-dns.com&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 4: Verify the Domain
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;After updating DNS records, return to your Vercel dashboard.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Verify&lt;/strong&gt; on the domain you added.&lt;/li&gt;
&lt;li&gt;DNS propagation might take a few minutes (or up to 24 hours).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 5: Set as Primary Domain
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Once verified, set the domain (e.g., &lt;code&gt;yourdomain.com&lt;/code&gt;) as the &lt;strong&gt;primary&lt;/strong&gt; domain in the Vercel dashboard.&lt;/li&gt;
&lt;li&gt;Optionally, redirect &lt;code&gt;www&lt;/code&gt; to your main domain (Vercel provides a toggle for this).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 6: Enable HTTPS
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Vercel automatically provisions &lt;strong&gt;SSL/TLS certificates&lt;/strong&gt; (via Let’s Encrypt) for your domain.&lt;/li&gt;
&lt;li&gt;Within a few minutes, your site will be accessible via &lt;code&gt;https://yourdomain.com&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Pro Tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Subdomains:&lt;/strong&gt; You can add multiple subdomains in the same way (e.g., &lt;code&gt;api.yourdomain.com&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom DNS:&lt;/strong&gt; If your DNS is not managed by your domain provider, you can use Vercel’s built-in &lt;strong&gt;Vercel DNS&lt;/strong&gt; for simplicity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instant Preview Links:&lt;/strong&gt; Keep using Vercel’s preview URLs (&lt;code&gt;.vercel.app&lt;/code&gt;) while working on staging versions.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
That’s it! You’ve successfully connected your custom domain to your Vercel project. Now your application is live at your own branded domain.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Push to multiple GitHub accounts!</title>
      <dc:creator>nikhil mahato</dc:creator>
      <pubDate>Sat, 28 Dec 2024 05:50:39 +0000</pubDate>
      <link>https://dev.to/nikhil_mahato/push-to-multiple-github-accounts-3k99</link>
      <guid>https://dev.to/nikhil_mahato/push-to-multiple-github-accounts-3k99</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Generate SSH Key&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;For each account, generate a separate SSH key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen -t ed25519 -C "your-email-for-first-account" -f ~/.ssh/id_ed25519_first
ssh-keygen -t ed25519 -C "your-email-for-second-account" -f ~/.ssh/id_ed25519_second

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-t ed25519&lt;/code&gt;: Specifies the type of key (ed25519).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-C "your-email-for-first-account"&lt;/code&gt;: Adds a comment for identification.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-f ~/.ssh/id_ed25519_first&lt;/code&gt;: Specifies the file name for the private key (&lt;code&gt;~/.ssh/id_ed25519_first&lt;/code&gt;) and the public key will automatically be named &lt;code&gt;~/.ssh/id_ed25519_first.pub&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Add SSH Keys to the Agent
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519_first
ssh-add ~/.ssh/id_ed25519_second

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  List Existing SSH Keys
&lt;/h2&gt;

&lt;p&gt;Run the following command to list your SSH keys:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls ~/.ssh

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see files like &lt;code&gt;id_ed25519&lt;/code&gt;, &lt;code&gt;id_ed25519.pub&lt;/code&gt;, &lt;code&gt;id_ed25519_first&lt;/code&gt;, &lt;code&gt;id_ed25519_second&lt;/code&gt;, or similar. The .pub files are the public keys.&lt;/p&gt;

&lt;h2&gt;
  
  
  Add the Public Keys to GitHub
&lt;/h2&gt;

&lt;p&gt;Copy each public key to GitHub:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat ~/.ssh/id_ed25519_first.pub
cat ~/.ssh/id_ed25519_second.pub

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add these keys to the respective GitHub accounts under &lt;strong&gt;Settings &amp;gt; SSH and GPG keys.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Configure &lt;code&gt;~/.ssh/config&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Create or edit the &lt;code&gt;~/.ssh/config&lt;/code&gt; file to define host aliases:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nano ~/.ssh/config

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the following lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Host github-first
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_ed25519_first

Host github-second
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_ed25519_second

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Save the file.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Test SSH Keys
&lt;/h2&gt;

&lt;p&gt;Use the following command to test your SSH keys with GitHub.&lt;br&gt;
For the first account:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh -T git@github-first

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see a message like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hi username! You've successfully authenticated, but GitHub does not provide shell access.

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Check for the second account too!&lt;/strong&gt;&lt;br&gt;
If you encounter any issues, ensure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The correct SSH keys are added to the agent.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;~/.ssh/config&lt;/code&gt; file is correctly set up.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Clone Repositories
&lt;/h2&gt;

&lt;p&gt;Use the alias for the desired account:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone git@github-first:username/repository.git
git clone git@github-second:username/repository.git

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Update an Existing Repository's Remote
&lt;/h2&gt;

&lt;p&gt;If you're switching remotes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote set-url origin git@github-first:username/repository.git
git remote set-url origin git@github-second:username/repository.git

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Push Code from VS Code(or any code editor)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Open the repository folder in VS Code.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Ensure the correct remote is set:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote -v

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Commit and push code:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add .
git commit -m "Your commit message"
git push origin main

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>webdev</category>
      <category>github</category>
      <category>vscode</category>
      <category>ssh</category>
    </item>
    <item>
      <title>next js app on cPanel</title>
      <dc:creator>nikhil mahato</dc:creator>
      <pubDate>Sat, 10 Aug 2024 17:12:26 +0000</pubDate>
      <link>https://dev.to/nikhil_mahato/next-js-app-on-cpanel-18lb</link>
      <guid>https://dev.to/nikhil_mahato/next-js-app-on-cpanel-18lb</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const nextConfig = {
    output:'export',

};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run build

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will create a production build of your project in the out directory.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv4eyas4n91zmg6v96mtf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv4eyas4n91zmg6v96mtf.png" alt="Image description" width="531" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Finally, deploy your project:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open your hosting provider’s control panel.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to the File Manager.&lt;/li&gt;
&lt;li&gt;Go to the public folder.&lt;/li&gt;
&lt;li&gt;Upload the contents of the out directory to the public folder.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And that's it! Your Next.js project  is now live.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl7pg5dvihs6obzggw0sm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl7pg5dvihs6obzggw0sm.png" alt="Image description" width="800" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>hostinger</category>
      <category>cpanel</category>
      <category>freelance</category>
    </item>
  </channel>
</rss>
