<?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: Rohan T George</title>
    <description>The latest articles on DEV Community by Rohan T George (@rohantgeorge).</description>
    <link>https://dev.to/rohantgeorge</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%2F1085905%2Fb8fd49fc-a1b6-4dcd-81f7-eebe556f9395.png</url>
      <title>DEV Community: Rohan T George</title>
      <link>https://dev.to/rohantgeorge</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rohantgeorge"/>
    <language>en</language>
    <item>
      <title>🚀 Deploy Your Project to GitHub Pages Using gh-pages</title>
      <dc:creator>Rohan T George</dc:creator>
      <pubDate>Mon, 28 Apr 2025 02:46:35 +0000</pubDate>
      <link>https://dev.to/rohantgeorge/deploy-your-project-to-github-pages-using-gh-pages-1dlh</link>
      <guid>https://dev.to/rohantgeorge/deploy-your-project-to-github-pages-using-gh-pages-1dlh</guid>
      <description>&lt;p&gt;Have you ever finished a side project — maybe a cool React app, a static website, or a portfolio — and then asked yourself, &lt;strong&gt;"Now what? How do I put this live?"&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
One of the easiest (and free!) solutions is &lt;strong&gt;GitHub Pages&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;In this article, we'll dive into why you'd use &lt;code&gt;gh-pages&lt;/code&gt;, how to set it up, and step-by-step how to deploy your project. &lt;/p&gt;

&lt;p&gt;Let's get into it! 🎯&lt;/p&gt;


&lt;h2&gt;
  
  
  📌 The Problem: You Have a Project but No Hosting
&lt;/h2&gt;

&lt;p&gt;When you build a frontend project locally, it's just on your computer. To show it to the world (or a recruiter 👀), you need to host it somewhere. &lt;/p&gt;

&lt;p&gt;Traditional hosting options (Netlify, Vercel, AWS) are great but can be &lt;strong&gt;overkill&lt;/strong&gt; for small projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub Pages&lt;/strong&gt; is a perfect alternative:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's free.&lt;/li&gt;
&lt;li&gt;It's simple to configure.&lt;/li&gt;
&lt;li&gt;It integrates directly with your GitHub repositories.&lt;/li&gt;
&lt;li&gt;No backend server needed!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, manually setting up your project for GitHub Pages (especially for React or Vite apps) can be a pain — because you often need a build process and a specific branch (&lt;code&gt;gh-pages&lt;/code&gt;) to host your compiled code.&lt;/p&gt;

&lt;p&gt;That's where the &lt;strong&gt;&lt;code&gt;gh-pages&lt;/code&gt;&lt;/strong&gt; package comes in!&lt;/p&gt;


&lt;h2&gt;
  
  
  🛠️ The Method: Use the &lt;code&gt;gh-pages&lt;/code&gt; npm package
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;gh-pages&lt;/code&gt; automates the deployment for you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Builds your project.&lt;/li&gt;
&lt;li&gt;Creates a special &lt;code&gt;gh-pages&lt;/code&gt; branch.&lt;/li&gt;
&lt;li&gt;Pushes your built files there.&lt;/li&gt;
&lt;li&gt;GitHub then serves it live!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's how you can set it up:&lt;/p&gt;


&lt;h2&gt;
  
  
  ⚙️ Step-by-Step Setup Guide
&lt;/h2&gt;
&lt;h3&gt;
  
  
  1. Install &lt;code&gt;gh-pages&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;First, you need to add &lt;code&gt;gh-pages&lt;/code&gt; as a development dependency:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;gh-pages &lt;span class="nt"&gt;--save-dev&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows you to run deployment commands easily.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Add a &lt;code&gt;homepage&lt;/code&gt; field in your &lt;code&gt;package.json&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;GitHub Pages needs to know where your app will live.&lt;br&gt;&lt;br&gt;
Open your &lt;code&gt;package.json&lt;/code&gt; and &lt;strong&gt;add the following at the top level&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"homepage"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://&amp;lt;your-github-username&amp;gt;.github.io/&amp;lt;your-repo-name&amp;gt;"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"homepage"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://johndoe.github.io/my-portfolio"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 This ensures that your assets and routes are correctly handled.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Update your &lt;code&gt;scripts&lt;/code&gt; in &lt;code&gt;package.json&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Still in &lt;code&gt;package.json&lt;/code&gt;, under the &lt;code&gt;"scripts"&lt;/code&gt; section, add:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"predeploy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm run build"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"deploy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"gh-pages -d build"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;predeploy&lt;/code&gt; will &lt;strong&gt;automatically build&lt;/strong&gt; your project before deploying.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;deploy&lt;/code&gt; will &lt;strong&gt;push&lt;/strong&gt; the &lt;code&gt;build&lt;/code&gt; folder contents to the &lt;code&gt;gh-pages&lt;/code&gt; branch.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: If you are using &lt;strong&gt;Vite&lt;/strong&gt;, your output folder might be &lt;code&gt;dist&lt;/code&gt; instead of &lt;code&gt;build&lt;/code&gt;. Adjust accordingly!&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  4. Push Your Project to GitHub
&lt;/h3&gt;

&lt;p&gt;If you haven't already initialized a Git repo, do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git init
git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Initial commit"&lt;/span&gt;
git branch &lt;span class="nt"&gt;-M&lt;/span&gt; main
git remote add origin https://github.com/&amp;lt;your-username&amp;gt;/&amp;lt;your-repo-name&amp;gt;.git
git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures GitHub knows about your project and can host it.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Deploy!
&lt;/h3&gt;

&lt;p&gt;Now the fun part 🎉&lt;/p&gt;

&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Runs your build process.&lt;/li&gt;
&lt;li&gt;Pushes the compiled files to the &lt;code&gt;gh-pages&lt;/code&gt; branch.&lt;/li&gt;
&lt;li&gt;Automatically sets up the deployment.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  6. Check GitHub Pages Settings (Optional)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Go to your repository on GitHub.&lt;/li&gt;
&lt;li&gt;Navigate to &lt;strong&gt;Settings → Pages&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Under "Source," select the &lt;strong&gt;&lt;code&gt;gh-pages&lt;/code&gt; branch&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;GitHub will display the URL where your site is live.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Boom! 🚀 Your project is now live and shareable with the world.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧩 Common Gotchas
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Wrong homepage URL&lt;/strong&gt;: Always use the format &lt;code&gt;https://&amp;lt;username&amp;gt;.github.io/&amp;lt;repo-name&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;404 errors on refresh (React Router)&lt;/strong&gt;: GitHub Pages doesn't handle client-side routing very well out-of-the-box. You might need to create a &lt;code&gt;404.html&lt;/code&gt; redirect file or adjust your &lt;code&gt;BrowserRouter&lt;/code&gt; to &lt;code&gt;HashRouter&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wrong output directory&lt;/strong&gt;: If you use tools like &lt;strong&gt;Vite&lt;/strong&gt;, make sure to deploy the correct folder (&lt;code&gt;dist&lt;/code&gt;, not &lt;code&gt;build&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📚 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Deploying projects shouldn't be harder than building them!&lt;br&gt;&lt;br&gt;
Thanks to tools like &lt;code&gt;gh-pages&lt;/code&gt;, sharing your work becomes effortless.&lt;/p&gt;

&lt;p&gt;Now you have no excuse — &lt;strong&gt;deploy that project!&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Share it, put it in your portfolio, apply for that job, and show off what you made.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Bonus Tip: Automate Deployments
&lt;/h2&gt;

&lt;p&gt;You can even set up GitHub Actions to auto-deploy every time you push to &lt;code&gt;main&lt;/code&gt;. But that's a story for another article... 👀&lt;/p&gt;




&lt;p&gt;Thanks for reading!&lt;br&gt;&lt;br&gt;
If you liked this tutorial, drop a ❤️ or comment below — I'd love to see what you deployed!&lt;/p&gt;

</description>
      <category>github</category>
      <category>osdc</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to Fix 404 Error on Vercel with React Router and Client-Side Routing</title>
      <dc:creator>Rohan T George</dc:creator>
      <pubDate>Sun, 27 Apr 2025 14:34:11 +0000</pubDate>
      <link>https://dev.to/rohantgeorge/how-to-fix-404-error-on-vercel-with-react-router-and-client-side-routing-1n52</link>
      <guid>https://dev.to/rohantgeorge/how-to-fix-404-error-on-vercel-with-react-router-and-client-side-routing-1n52</guid>
      <description>&lt;p&gt;When deploying React applications to Vercel, you may encounter a frustrating issue where direct URLs like &lt;code&gt;/about&lt;/code&gt; or &lt;code&gt;/contact&lt;/code&gt; result in a 404 page. This happens because Vercel serves static files by default, and when you try to access a route that doesn't correspond to a file on the server, it returns a 404 error. In this article, I'll walk you through how I encountered this issue, the steps I took to resolve it, and how you can fix this in your own React app deployed on Vercel.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Intro&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;React applications that use React Router for client-side routing can run into problems when deployed to static hosting services like Vercel. Since Vercel serves files based on URLs, it expects an actual file to be found at every URL you access. However, in a single-page application (SPA) like a React app, the routing is handled by JavaScript running on the client-side, and no physical files exist for routes like &lt;code&gt;/about&lt;/code&gt;, &lt;code&gt;/contact&lt;/code&gt;, etc. This causes a 404 error if you try to directly access these URLs.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How I Came to Know About the Issue&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When I deployed my React app on Vercel, I encountered an issue where navigating directly to a route such as &lt;code&gt;https://your-app.vercel.app/about&lt;/code&gt; or refreshing the page would show a 404 error. Initially, everything worked fine during development and in the browser when navigating between pages. However, once I uploaded the app to Vercel, directly entering a URL or refreshing the page led to an error, as Vercel was trying to find an actual file at the given path and couldn’t find anything.&lt;/p&gt;

&lt;p&gt;This issue wasn’t related to React or React Router itself. It stemmed from the way Vercel serves static files and doesn’t know how to handle dynamic routes like those used in SPAs.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Steps to Solve the Issue&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Identify the Problem&lt;/strong&gt;:&lt;br&gt;
The root cause of this issue lies in how static hosting services like Vercel serve files. When you access a URL like &lt;code&gt;/about&lt;/code&gt;, Vercel looks for a physical file that matches that URL path, such as &lt;code&gt;/about.html&lt;/code&gt;. However, in a React SPA, routes are handled entirely by JavaScript and React Router, and there are no physical files corresponding to the routes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Understand the Solution&lt;/strong&gt;:&lt;br&gt;
We need to tell Vercel to redirect all routes to the &lt;code&gt;index.html&lt;/code&gt; file. This allows React Router to take over and handle the routing on the client side, ensuring that the correct component is rendered when you visit a route.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Set Up a Rewrite Rule&lt;/strong&gt;:&lt;br&gt;
The solution involves adding a rewrite rule that ensures every URL, whether it’s &lt;code&gt;/about&lt;/code&gt;, &lt;code&gt;/contact&lt;/code&gt;, or any other route, is routed to the &lt;code&gt;index.html&lt;/code&gt; file. Once the &lt;code&gt;index.html&lt;/code&gt; file is loaded, React Router will handle the rest.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Solution&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To fix this, you need to configure Vercel to handle client-side routing correctly by redirecting all paths to the &lt;code&gt;index.html&lt;/code&gt; file. Here's how you can achieve that:&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Option 1: Using &lt;code&gt;vercel.json&lt;/code&gt; Configuration&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create a &lt;code&gt;vercel.json&lt;/code&gt; File&lt;/strong&gt;:
In your project’s root directory, create a &lt;code&gt;vercel.json&lt;/code&gt; file with the following content:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"rewrites"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/:path*"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"destination"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/index.html"&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What This Does&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;rewrites&lt;/code&gt;&lt;/strong&gt;: This rule tells Vercel to rewrite all URLs (specified by &lt;code&gt;:path*&lt;/code&gt;) to point to the &lt;code&gt;index.html&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;source&lt;/code&gt;: "/:path*"&lt;/strong&gt;: This matches any URL path, including paths like &lt;code&gt;/about&lt;/code&gt;, &lt;code&gt;/contact&lt;/code&gt;, and &lt;code&gt;/locations&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;destination&lt;/code&gt;: "/index.html"&lt;/strong&gt;: This ensures that no matter what route is accessed, Vercel serves the &lt;code&gt;index.html&lt;/code&gt; file, allowing React Router to take control.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deploy Changes&lt;/strong&gt;:&lt;br&gt;
Once you've added this &lt;code&gt;vercel.json&lt;/code&gt; file to your project, commit and push the changes to your repository. Vercel will automatically redeploy your app with the new configuration.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Option 2: Using Vercel’s Dashboard for Redirects&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Alternatively, you can set up redirects and rewrites directly through Vercel’s dashboard:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to your &lt;strong&gt;Vercel Dashboard&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Settings&lt;/strong&gt;, find the &lt;strong&gt;Redirects/Rewrites&lt;/strong&gt; section.&lt;/li&gt;
&lt;li&gt;Add a new &lt;strong&gt;Rewrite&lt;/strong&gt; rule with the following configuration:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Source&lt;/strong&gt;: &lt;code&gt;/:path*&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Destination&lt;/strong&gt;: &lt;code&gt;/index.html&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Type&lt;/strong&gt;: &lt;code&gt;200 (Rewrite)&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This accomplishes the same result without needing a &lt;code&gt;vercel.json&lt;/code&gt; file.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;By default, Vercel serves files based on their URL path, which can lead to 404 errors when you try to access routes like &lt;code&gt;/about&lt;/code&gt; or &lt;code&gt;/contact&lt;/code&gt; in a React app that uses React Router. The solution is simple: configure Vercel to redirect all routes to the &lt;code&gt;index.html&lt;/code&gt; file, allowing React Router to handle the client-side routing. &lt;/p&gt;

&lt;p&gt;With this setup, your app will work seamlessly both when users navigate between pages within the app and when they refresh or directly access routes via URL. This is a common issue faced by React developers deploying SPAs to Vercel, and now you have a clear, actionable solution to fix it.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Bonus Tips:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;If you use other static hosting services like Netlify or GitHub Pages, the solution for handling client-side routing is similar, and these services provide their own configuration methods (like &lt;code&gt;_redirects&lt;/code&gt; file for Netlify).&lt;/li&gt;
&lt;li&gt;Always test your app in different scenarios—local development, direct navigation, and page refreshes—after deploying to catch any potential issues early.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you found this article helpful, don't forget to share it with others in the React community!&lt;/p&gt;

</description>
      <category>vercel</category>
      <category>react</category>
      <category>reactrouter</category>
      <category>404</category>
    </item>
    <item>
      <title>Mastering WordPress: Rohan T George's Upwork Success Story</title>
      <dc:creator>Rohan T George</dc:creator>
      <pubDate>Sun, 27 Apr 2025 04:08:50 +0000</pubDate>
      <link>https://dev.to/rohantgeorge/mastering-wordpress-rohan-t-georges-upwork-success-story-5620</link>
      <guid>https://dev.to/rohantgeorge/mastering-wordpress-rohan-t-georges-upwork-success-story-5620</guid>
      <description>&lt;p&gt;Join me, &lt;strong&gt;Rohan T George&lt;/strong&gt;, a Top-Rated WordPress Developer on &lt;a href="https://www.upwork.com/freelancers/~016069dffed08abc4d?mp_source=share" rel="noopener noreferrer"&gt;Upwork&lt;/a&gt;, as I share my journey in creating stunning, high-performing websites! In this video, you'll discover my expertise in custom WordPress development, WooCommerce stores, and SEO-friendly designs, all backed by 6+ years of experience and 100% client satisfaction. Watch as I showcase my streamlined process from initial consultation to final launch, ensuring your project is a success!  &lt;/p&gt;

&lt;p&gt;Ready to build your dream website? Don't miss the opportunity to hire me on Upwork! Like and share this video to spread the word!  &lt;/p&gt;

</description>
      <category>wordpressdeveloper</category>
      <category>upworksuccess</category>
      <category>webdev</category>
      <category>hireme</category>
    </item>
    <item>
      <title>How to Manage Multiple GitHub Accounts Seamlessly</title>
      <dc:creator>Rohan T George</dc:creator>
      <pubDate>Sun, 27 Apr 2025 03:59:14 +0000</pubDate>
      <link>https://dev.to/rohantgeorge/how-to-manage-multiple-github-accounts-seamlessly-23m1</link>
      <guid>https://dev.to/rohantgeorge/how-to-manage-multiple-github-accounts-seamlessly-23m1</guid>
      <description>&lt;p&gt;Managing multiple GitHub accounts can quickly become a hassle if you're switching between personal, work, or client projects. Here's a comprehensive guide on setting up and managing multiple GitHub accounts effectively.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Use Multiple GitHub Accounts?
&lt;/h2&gt;

&lt;p&gt;Many developers maintain separate accounts for different purposes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Professional:&lt;/strong&gt; Dedicated to your work projects and collaborations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Personal:&lt;/strong&gt; For personal or open-source contributions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Freelance/Client:&lt;/strong&gt; Separate client or freelance work from your personal projects.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step-by-Step Guide to Set Up Multiple GitHub Accounts
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Generate SSH Keys
&lt;/h3&gt;

&lt;p&gt;To generate a new SSH key pair for each GitHub account, open your terminal (on macOS or Linux) or Git Bash (on Windows). Then execute the following command, replacing &lt;code&gt;your_email@example.com&lt;/code&gt; with the email address associated with your GitHub account:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; ed25519 &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="s2"&gt;"your_email@example.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Press Enter to accept the default location (&lt;code&gt;~/.ssh/id_ed25519&lt;/code&gt;) or type a unique filename (e.g., &lt;code&gt;~/.ssh/id_ed25519_personal&lt;/code&gt;) to differentiate between multiple accounts. You can optionally add a passphrase for added security. For example, when prompted:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter passphrase (empty for no passphrase): your_secure_passphrase
Enter same passphrase again: your_secure_passphrase
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This passphrase adds an extra layer of protection by encrypting your SSH key.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; ed25519 &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="s2"&gt;"your_email@example.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save each key to a unique file within the &lt;code&gt;.ssh&lt;/code&gt; directory located in your user's home directory (typically at &lt;code&gt;~/.ssh&lt;/code&gt;). Examples of filenames include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;~/.ssh/id_ed25519_personal&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/.ssh/id_ed25519_work&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 2: Add SSH Keys to GitHub Accounts
&lt;/h3&gt;

&lt;p&gt;Go to your GitHub account settings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Settings → SSH and GPG keys → New SSH key&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Paste the contents of your public key file (e.g., &lt;code&gt;~/.ssh/id_ed25519_personal.pub&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Repeat this for each account.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Configure SSH
&lt;/h3&gt;

&lt;p&gt;Edit your SSH config file at &lt;code&gt;~/.ssh/config&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ssh"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Personal Account&lt;/span&gt;
&lt;span class="k"&gt;Host&lt;/span&gt; github.com-personal
  &lt;span class="k"&gt;HostName&lt;/span&gt; github.com
  &lt;span class="k"&gt;User&lt;/span&gt; git
  &lt;span class="k"&gt;IdentityFile&lt;/span&gt; ~/.ssh/id_ed25519_personal

&lt;span class="c1"&gt;# Work Account&lt;/span&gt;
&lt;span class="k"&gt;Host&lt;/span&gt; github.com-work
  &lt;span class="k"&gt;HostName&lt;/span&gt; github.com
  &lt;span class="k"&gt;User&lt;/span&gt; git
  &lt;span class="k"&gt;IdentityFile&lt;/span&gt; ~/.ssh/id_ed25519_work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Clone Repositories Using Custom Hosts
&lt;/h3&gt;

&lt;p&gt;Instead of cloning normally, use your configured SSH host aliases:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone git@github.com-personal:username/repo.git
&lt;span class="c"&gt;# or&lt;/span&gt;
git clone git@github.com-work:companyname/repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5: Set Up Git Configuration per Repository
&lt;/h3&gt;

&lt;p&gt;Configure Git user details within each cloned repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config user.name &lt;span class="s2"&gt;"Your Name"&lt;/span&gt;
git config user.email &lt;span class="s2"&gt;"your_email@example.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, use conditional includes in your global git config (&lt;code&gt;~/.gitconfig&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[includeIf "gitdir:~/work/"]&lt;/span&gt;
  &lt;span class="py"&gt;path&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;~/work/.gitconfig-work&lt;/span&gt;

&lt;span class="nn"&gt;[includeIf "gitdir:~/personal/"]&lt;/span&gt;
  &lt;span class="py"&gt;path&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;~/personal/.gitconfig-personal&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, create separate &lt;code&gt;.gitconfig-work&lt;/code&gt; and &lt;code&gt;.gitconfig-personal&lt;/code&gt; files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[user]&lt;/span&gt;
  &lt;span class="py"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;Your Work Name&lt;/span&gt;
  &lt;span class="py"&gt;email&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;work_email@example.com&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 6: Verify Your Configuration
&lt;/h3&gt;

&lt;p&gt;To verify your setup, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh &lt;span class="nt"&gt;-T&lt;/span&gt; git@github.com-personal
ssh &lt;span class="nt"&gt;-T&lt;/span&gt; git@github.com-work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see a success message indicating you're authenticated correctly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tips and Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Always verify the SSH key in use before pushing sensitive changes (&lt;code&gt;ssh-add -l&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Clearly name SSH keys and configurations for easy management.&lt;/li&gt;
&lt;li&gt;Regularly update and rotate your keys for enhanced security.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Troubleshooting Common Issues
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SSH authentication fails:&lt;/strong&gt; Verify the correct SSH key and configuration host are used.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pushing commits under the wrong identity:&lt;/strong&gt; Double-check the Git configurations for user email and name in your repository settings.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Effectively managing multiple GitHub accounts ensures a clear separation between personal, professional, and client projects, enhancing security and organization. By following this structured approach, you can seamlessly work across different GitHub identities without confusion.&lt;/p&gt;

</description>
      <category>github</category>
      <category>githubssh</category>
      <category>workmanagement</category>
      <category>development</category>
    </item>
    <item>
      <title>WordPress vs Other CMS: Pros and Cons</title>
      <dc:creator>Rohan T George</dc:creator>
      <pubDate>Sun, 21 May 2023 18:09:56 +0000</pubDate>
      <link>https://dev.to/rohantgeorge/wordpress-vs-other-cms-pros-and-cons-kdm</link>
      <guid>https://dev.to/rohantgeorge/wordpress-vs-other-cms-pros-and-cons-kdm</guid>
      <description>&lt;p&gt;When it comes to building a website, choosing the right content management system (CMS) is essential. WordPress is one of the most popular CMS platforms, but it’s not the only one. In this blog post, we’ll explore the pros and cons of WordPress compared to other CMS platforms.&lt;/p&gt;

&lt;h2&gt;
  
  
  WordPress Pros:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Ease of Use:&lt;/strong&gt; WordPress is known for its user-friendly interface, making it easy for beginners to build and manage a website.&lt;br&gt;
&lt;strong&gt;Customization:&lt;/strong&gt; WordPress provides a vast library of themes and plugins that allow users to customize their website’s appearance and functionality.&lt;br&gt;
&lt;strong&gt;Community Support:&lt;/strong&gt; With its large user base, WordPress has an extensive community of developers and users who provide support and share resources.&lt;br&gt;
&lt;strong&gt;SEO-Friendly:&lt;/strong&gt; WordPress is built with SEO in mind, providing features like customizable permalinks, easy content creation, and optimization plugins like Yoast.&lt;br&gt;
&lt;strong&gt;Cost-Effective:&lt;/strong&gt; WordPress itself is free, and many of its themes and plugins are also free or low-cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  WordPress Cons:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt; As with any popular platform, WordPress is a target for hackers, and security vulnerabilities can lead to website hacks and data breaches.&lt;br&gt;
&lt;strong&gt;Speed and Performance:&lt;/strong&gt; WordPress can be slow and resource-intensive, especially with poorly optimized themes and plugins.&lt;br&gt;
&lt;strong&gt;Updates and Maintenance:&lt;/strong&gt; WordPress requires regular updates and maintenance to keep the website secure and running smoothly, which can be time-consuming.&lt;br&gt;
&lt;strong&gt;Customization Limitations:&lt;/strong&gt; While WordPress offers a wide range of customization options, there may be limitations in terms of design and functionality.&lt;/p&gt;

&lt;h2&gt;
  
  
  Other CMS Pros and Cons:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Drupal:&lt;/strong&gt; Drupal offers advanced customization options and a robust security framework, but it can be complex and challenging for beginners.&lt;br&gt;
&lt;strong&gt;Joomla:&lt;/strong&gt; Joomla is user-friendly and offers a wide range of features and extensions, but it can be slow and not as SEO-friendly as WordPress.&lt;br&gt;
&lt;strong&gt;Shopify:&lt;/strong&gt; Shopify is a popular ecommerce platform that offers easy setup and customization, but it can be costly and limited in terms of design and functionality.&lt;/p&gt;

&lt;p&gt;In conclusion, each CMS platform has its strengths and weaknesses. WordPress is a popular choice for its ease of use, customization options, and community support. However, it’s not without its drawbacks, such as security vulnerabilities and maintenance requirements. When choosing a CMS, it’s essential to consider your website’s specific needs and choose a platform that best meets those needs.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;View more latest news on &lt;a href="https://rohantgeorge.com/blog/" rel="noopener noreferrer"&gt;My Blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cms</category>
      <category>webdev</category>
      <category>wordpress</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Future of WordPress: Trends and Predictions</title>
      <dc:creator>Rohan T George</dc:creator>
      <pubDate>Fri, 19 May 2023 22:54:31 +0000</pubDate>
      <link>https://dev.to/rohantgeorge/the-future-of-wordpress-trends-and-predictions-1l64</link>
      <guid>https://dev.to/rohantgeorge/the-future-of-wordpress-trends-and-predictions-1l64</guid>
      <description>&lt;p&gt;WordPress has come a long way since its inception in 2003. It has become one of the most popular content management systems (CMS) in the world, powering more than 40% of all websites on the internet. With the rise of new technologies and changing user preferences, what does the future hold for WordPress? In this blog post, we’ll explore some of the latest trends and predictions for the future of WordPress.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Increased Use of Artificial Intelligence (AI) and Machine Learning (ML)&lt;/strong&gt;&lt;br&gt;
AI and ML are already changing the way we interact with technology, and it’s no different for WordPress. In the future, we can expect to see more AI-powered tools and plugins that make it easier to manage and optimize WordPress sites. For example, chatbots that use natural language processing (NLP) could be used to provide customer support, while ML algorithms could help optimize content for search engines.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Growth of Headless WordPress&lt;/strong&gt;&lt;br&gt;
Headless WordPress is an increasingly popular approach to website development, where the front-end and back-end of a website are decoupled. This approach allows developers to build more complex and scalable websites, using different front-end frameworks like React, Vue, or Angular. As more developers adopt this approach, we can expect to see more plugins and tools specifically designed for headless WordPress.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Continued Focus on Accessibility and Inclusivity&lt;/strong&gt;&lt;br&gt;
Accessibility and inclusivity have always been essential values for WordPress, and this trend is likely to continue in the future. With more awareness around web accessibility and the increasing number of laws and regulations related to it, WordPress is likely to focus on making its core platform and themes more accessible for all users, including those with disabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Increased Use of Cloud-Based Technologies&lt;/strong&gt;&lt;br&gt;
As the internet continues to evolve, cloud-based technologies are becoming increasingly important for website development and hosting. WordPress has already started moving in this direction, with the introduction of WordPress.com, which offers cloud-based hosting and management for WordPress sites. We can expect to see more cloud-based technologies and solutions for WordPress in the future, making it easier and more cost-effective to run and manage WordPress sites.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Continued Focus on Security and Privacy&lt;/strong&gt;&lt;br&gt;
As cyber threats become more sophisticated, security and privacy are critical concerns for website owners and users. WordPress has always taken security seriously, with regular updates and patches to keep sites secure. We can expect to see even more focus on security and privacy in the future, with new features and tools designed to protect WordPress sites from cyber threats.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. More Emphasis on Mobile Optimization&lt;/strong&gt;&lt;br&gt;
With more and more users accessing the internet on mobile devices, mobile optimization is no longer an option but a necessity. WordPress has already taken steps to improve mobile optimization with its responsive themes and plugins. However, we can expect to see more emphasis on mobile optimization in the future, with new tools and features designed specifically for mobile users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Increased Use of Video and Interactive Content&lt;/strong&gt;&lt;br&gt;
As users become more engaged with interactive and multimedia content, we can expect to see WordPress embrace these trends. More themes and plugins will be designed to handle video and interactive content, while website owners will have more tools at their disposal to create engaging and interactive websites.&lt;/p&gt;

&lt;p&gt;In conclusion, the future of WordPress is bright, with many exciting trends and predictions on the horizon. From increased use of AI and ML to a continued focus on accessibility and inclusivity, WordPress is evolving to meet the changing needs of its users. With its open-source community and dedicated developers, we can expect to see WordPress continue to lead the way in website development and content management for years to come.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;View more latest news on &lt;a href="https://rohantgeorge.com/blog/" rel="noopener noreferrer"&gt;My Blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>wordpress</category>
      <category>cms</category>
      <category>web</category>
    </item>
  </channel>
</rss>
