Google Sites

How To Change Google Sites Url 2022

It’s no secret that Google Sites is an excellent platform for creating websites, but How To Change Google Sites Url?  However, it can be frustrating if you need to change the URL at some point. Here’s how to change your Google Sites URL.


How To Change Google Sites Url

What you’ll need:

-Your Google Sites URL -A computer with internet access -An understanding of how to use the command line/terminal on your computer  

Step 1 : How To Change Google Sites Url

Navigate to the folder for your website on your computer by opening up the terminal and typing in cd websites/yourwebsitefolder or if you are using Mac OS X, open Finder and navigate to “Users > Your username > websites.” For example, this tutorial’s “websites” folder is in “/Users/davidhrabee/Sites” on a Mac.

Step 2 : How To Change Google Sites Url

Next, you need to delete the site. Go to the folder you navigated to in step 1 and enter rm -rf *

Note: Be sure that you haven’t changed file permissions of any of your files, or they will be deleted as well. If you are worried about deleting stuff that shouldn’t be deleted, skip this step and move on to Step 3.

Step 3 : How To Change Google Sites Url

Now, navigate to the folder where you want to store your new site. For our tutorial, we’ll be using as our new site and want it to be accessible from “”

Step 4 : How To Change Google Sites Url

Enter the following command (make sure you are in the website folder) followed by a space and enter your desired URL or short name for your new site: mv

Note: Make sure you use the correct folder, or it won’t work. The most important thing here is to remember to include the “/” at the end of your new site’s URL, or it will fail. If you don’t include that, Google Sites will not see the change and think your site is duplicated and will remove everything.

Step 5 : How To Change Google Sites Url

After entering the command, enter “Project site” and hit enter. This will update the content in Google Sites. Be sure you have closed all other tabs!

Step 6 : How To Change Google Sites Url

Next, we need to remove the original site’s URL from Google Webmasters to set our new URL as the primary one. To do this, we need to go back to our terminal and change back to our “website” folder. Then, type in find . -name hostname.html | grep -v http | xargs sed -i ‘s/^.+?//’

Note: In this command, the ” -name hostname.html ” will find all files that have “hostname” in the name and append “-HTML” at the end to indicate it is an HTML file. Likewise, the “-v HTTP” will ignore files that have “HTTP” in them, usually images or CSS files. Finally, “-i ‘s/^.+?//’ removes any slashes and periods from our site’s URL (the backslash before the period inserts a natural period into the site’s URL), so we don’t break anything in Google Sites.

Step 7 : How To Change Google Sites Url

After you’ve entered that command and hit enter, you’ll see a quick change “I’m sorry, but your site is already listed as the ‘primary homepage’ for the site.” This means that Google Sites can’t find any “.html files” (used to indicate an HTML file) in the folder. You need to run some commands from a computer because it’ll just give an error if you run them from your phone. So, type in: sed -i ‘s/^\.html$//’

Step 8 : How To Change Google Sites Url

That should have deleted all of the slashes, periods, and backslashes from your site’s URL, so you shouldn’t see any errors now. Hit enter, and you should see the prompt say it updated successfully.

Step 9 : How To Change Google Sites Url

Last but not least, go to Google Webmaster Tools and go to your site. You will see a prompt asking to verify settings and list things that need changing. Select “Change” and make sure the top choice is “Update primary domain”. Make sure your new site is selected as the primary website in that list and hit “update”. Be sure you recheck it after 24 hours because sometimes it can take Google a bit before it recognizes changes in your website’s settings.

Step 10 : How To Change Google Sites Url

Congrats! Your site is now using your new Google Site’s URL! If you have any questions, please leave a comment and let me know!


Click here and submit your site to search engines.