How to change internal links when you chance your blog's web-address

This article is about how to change internal cross-reference links in your blog, if you change your blog's URL or web-address.


Blog Name vs Blog Address

Your blog has two "names".

The blog title is what you type into the Title field when you create a new blog.   It is displayed in your header (unless you've replaced it with a picture), and in the title-bar of the browser window when someone reads your blog.  It does not need to be unique:  you can make a blog with the same name that anyone else has already used.

The web-address, also called the URL or just address is quite different. You select in the Address field when you create a new blog - but it's not just a matter of typing in what you want.   Web-addresses must be unique, so as you type in a possible URL Blogger says "checking availability" - and if someone else already has what you have entered, it says
Sorry, this blog address is not available.
and you have to keep trying until you find a blogspot URL which is not already taken.

Usually the blog-title and blog web-address are very closely related.   For example, the name of this blog is Blogger-hints-and-tips, and the web-address is www.Blogger-hints-and-tips.blogspot.com.  And they may be even more closely related if you have a custom domain, eg
Title / Name: Rustling.org
Web-address: www.Rustling.org

In this case, I've made the blog-name slightly geeky (with a .org on the end) to make it more memorable.

Changing title vs changing address

You can change the blog-name at any time, using the Settings > Basic > Title tab.   Doing this has no effect on any links in you posts or widgets.  (Although it may confuse people who find your blog by searching for the name rather than for the web-address - which is a good reason to encourage them to become subscribers, instead.)

You can change the blog-address using the Settings > Basic > Publishing tab.   Just like the original URL, whatever you change it to has to be unique, ie not one that anyone else has used.

Sidenote:  If you want to use an address that a different Google account, eg a friend, used to have, then you need to transfer the ownership:  having the previous owner delete a blog is not enough to release the blogspot address for someone else to use.

But if you change the blog-address, then any existing links to your blog become dead, ie they stop working and anyone who tried to follow them gets a 404 error. This applies to both external links (eg on other people's blogrolls or Google's search index) and to internal links (when you have a link to one post inside another post or gadget)


What happens if change your blog's web-address

If you change your blog's web-address, then Blogger changes the links in your Pages gadget that point to your pages.

But Blogger will not change any other internal links in your blog. This includes:
  • Links in your Pages gadget that were added as External web-addresses - even if those web-addresses are posts or pages in your blog.
  • Links in one post that point to another one (called cross-links)
  • Links in your other gadgets - including LinksList gadgets and HTML/Javascript ones.

Therefore all these links will break if you change your blog's web-address.    If someone tries to follow one of these links they get a message like this:
Blog has been removed
Sorry, the blog at yourOldAddress.blogspot.com has been removed. This address is not available for new blogs.

However gadgets which calculate links (eg Blogger's Popular Posts, or the third-party widgets like LinkWithin) do keep working, because the they get the current link of your posts when they need them rather than keeping a stored copy.   (That said, ones that rely on your RSS feed to for information may stop working correctly.)

And of course Blogger will not change links to your blog that are in other people's blog-posts or gadgets.

This is why it's A Very Good Idea to get your blog name - including a custom domain if you want one - right before you start writing posts with cross-links.


Relative addressing and the Blogger Post Editor

Some people have asked if it is possible to internal links (ie links from one post to another) as
/12/2013/how_to_do.html
instead of
www.my_blog_name.blogspot.com/12/2013/how_to_do.html

So that if they change the blog-address, the links will still work.

However Blogger's Post Edit does not support relative addressing, so this isn't possible: If you enter a link as
/12/2013/how_to_do.html

 then when you you publish the post it is changed to
http://0.0.0.12/2013/how_to_do.html     (if you add the link in compose mode), or
http://yourWebAddress/12/2013/how_to_do.html     (if you add the link in HTML mode).

(I think this is a change from Blogger's previous behaviour from when I last investigated this issue:  previously it changed the links to something like http:/blogger.com/12/2013/how_to_do.html - and of course this doesn't work either.)


How to change internal links in your posts when you change blog-address

Unfortunately Blogger doesn't provide any tool to automatically update all internal links in your posts when you change blog-address.

Instead, you have to manually:
  • Edit each post
  • Look at it in HTML mode and 
  • Find-and-replace any links. 

The only slight automation is that you can do the find-and-replace by copying the entire post-contents to a text-editor like Notepad, using the Replace tool there, and then copying the entire post contents back to the post editor.

Some people have asked if it's possible to do this by:
  • Exporting all your posts using the Export Blog tool on the Settings > Other > Export Blog option
  • Opening the exported file in a text editor, and changing all the links with the Find-and-Replace tool.
  • Deleting all the posts from your blog
  • Importing from your export file, after it's been edited.

However this won't work because Blogger remembers the address of each individual post, even after they're deleted.   It won't give the same URL to another post, ever.  Instead, it puts some numbers on the end, to make the URL unique. For example, when I tested this:
http://myTestBlog.blogspot.com/2014/07/sweet-retroo.html
became
http://myTestBlog.blogspot.com/2014/07/sweet-retroo_19.html

You could use the custom-re-directs feature to repoint each old post-url to the new one, it would probably be quicker overall to simply edit each post.




Related Articles:

How to edit a post you have already published

Adding a Pages gadget to your blog

Setting up a custom domain for Blogger

Giving another Blogger account access to an address that you own

Find things in your blog-posts' HTML by using temporary "marker text"

This article shows how to use "marker text" to help find things when you need to edit the HTML code behind one of your blog posts.



When you edit a post in Blogger, to start with you generally use the Compose mode, which shows you the formatted view of how your work will look.

But behind that formatted view, every post is actually written in HTML, ie Hyper-text Markup Language - a type of computer language that uses tags like <h2> or <a href="www.foo.com">  to say how to display the contents.

A number of articles, here and in other blogger-helper blogs tell you how to do thing by changing the HTML for the post. But if you are not used to working with HTML, it can be confusing tryign to fix the part that you need to change.

Marker-text is a technique that you can use to "mark" problem areas while you are still in Compose mode, so that you can easily find them again when you are in Edit HTML mode.


How to use marker-text to fix a problem in your post


Start to prepare or edit your post in the usual way.

Go to the place just before the problem you want to fix or change you want to make.

Add some extra blank lines.

In the middle of the extra blank lines, put a few characters or a word that do not occurr anywhere else in your post. I quite often use XXX - but you can use any letters, characters or numbers, for example PROBLEM JUST AFTER HERE or 12345.

Use the copy function to put the text you added (without the blank lines)into your computer's memory.

Optional: Go to the place just after the problem you want to fix or change you want to make, and add some more text eg PUT IT BEFORE HERE

Switch to Edit HTML mode, using the button at the top-left of the post editing window.

Start the "find" feature in your web browser:
  • ctrl / f in Chrome
  • ctrl / f in Internet Explorer

In the search box that opens, use Paste (ctrl / v) to put the exact marker text that you entered into the Find box, and press enter.

The post-edit window will scroll to the place where your marker text is, and it will most likely be highlighted.

You have now found the place where you need to work, so you can now make the HTML changes required.

Once you have fixed all the issues, switch back to Compose mode using the tab in the top left hand corner, and remove all the marker text and extra blank lines that you added.


Good Practise

You will be removing the marker text before you publish your post.

But just in case you accidentally click Publish before you mean to, only use text that would not be embarrassing if some of your readers accidentally see it.

Some RSS readers will see the contents of your post as they are when you first hit Publish, even if you edit them less than two minutes later.)




Leaving your Marker Text in Place

If you might need to find the same place in your post's HTML again, then instead of removing your marker-text, you may just want to comment it out.

To do this, put these characters before it:
<!-- 

and these characters after it
 -->

So it might look like this

<!-- START OF PROBLEM1 HERE -->

Make sure you get the spaces - highlighed in yellow   as well as both of the "-- characters.

If you do this, then you will not be able to see or find your Marker Text when you are in Compose Mode, but you will be able to see and find it when you are in Edit HTML mode.





Related Articles:

How to edit a post you have already published

Using cut, copy and paste in the Blogger post editor

The Blogger-helpers search tool

How to add a Google Contacts button to your blog, website or desktop

This article shows how to add a button that takes a user straight to Google Contacts to your blog or website.   It also distributes a picture that you can use in other places (eg your PC desktop) to make your own Google Contacts icon.




Most people have a button on their computer or smartphone, which they use to start their email.  For some, this goes straight to their Gmail account in a web-browser, while others use an system like Thunderbird or Outlook to look at their email messages in a Gmail account and/or in email accounts they have with other services.

If you use Gmail as your email system, then Google also gives you an address book, which they call Contacts. This is not the same as the address book in Thunderbird or Outlook etc, which is saved on your local computer.   Instead, the Google address book is saved on the internet, in your Google account.

Google Contacts is tightly linked to your Gmail account, and the way that most people access it is by:
  • Going to Gmail 
  • Clicking on the Contacts button in the left-sidebar.

But you can go straight into your Google Contacts, without having to load Gmail first.   And I often find that it is faster, especially if I just want to look up an address or phone number and not send an email.

To go directly into your Google Contacts book, just type    www.google.com/contacts into the address-bar of your web-browser.

This is easy - but some people would prefer to have a button that they can click, rather than having to manually type an address.

So I have created a picture that can be used on such a button, and written up instructions on how to add it to your website, or your computer.   This is licensed under Creative Commons:  I am giving permission for it to be freely used on any website, so long as you say where it came from in the way that I've shown below.

(If you a wondering "why on earth would anyone want that" - then please don't waste time reading further - you are clearly not the target audience of this post!   I know that there are some people who will be delighted with the idea, and that's who I'm writing for today.)


How to add a Google Contacts button to your blog or website

Set up a place to put the button

If you want to add the button to Blogger, then just add a gadget in the usual way, and choose gadget-type of HTML/Javascript.

If you want to add it to some other type of blog or website, then you need to use whatever procedure is required to add 3rd-party HTML to your site.

Add the code

The HTML code to add is:
<div class="separator" style="clear: both; text-align: center;"><a href="https://www.google.com/contacts" imageanchor="1" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" src="http://2.bp.blogspot.com/-_wwYm348HsY/U8BhN2lGEbI/AAAAAAAAS3o/FZNKRbtsiBk/s490/google-contacts-icon.png" width="50%" /><!-- Google Contacts Start button from www.Blogger-hints-and-tips.blogspot.com   Design � Blogger Hints-an-Tips, 2014.   Licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)  -->  </a></div>

Make sure you all all the code, including the Creative Commons license information - this is what says you are allowed to use the picture.

Configure the size

You can change the size of the button by changing the number in this statement:
width="98%"
On my sidebar in Blogger-Hint-and-tips, I have it set to 50%.

You can use either a percentage value, as shown, or a pixels or em measure, for example
width="50px"
width="10em"

Job done!

Save the change in the usual way, and you will have a button on your website which opens Google Contacts


How to add a Google Contacts button to your computer / laptop / desktop

This is a little more difficult to describe, because it depends on exactly what computer and operating system you have, and what you mean by adding the button "to your computer".   But here are some options.

Browser Favorites

One option is to go to  www.google.com/contacts   and then before you do anything else save it to the Favourites section in your browser - and then you know you can get to Contacts using your regular internet button and choosing it from your favourites.


In the Windows desktop

Right click on your desktop
  1. Choose New
  2. Choose Shortcut
  3. In the screen that asks what you want the shortcut to, enter  www.google.com/contacts
  4. Click Next
  5. Enter the Name you want the link to have, eg "Google Contacts", and click Finish


The shortcut that is added to your desktop has a standard internet picture.   To change it to another
  1. Download this file to your computer, and save it somewhere.
  2. Right click on the shortcut that was created, and choose Properties.
  3. Choose Change Icon
  4. Choose the file that you saved in step 1


Note:   these instructions were prepared using Windows 8 - they may vary slightly for earlier versions.   But the same general approach applies.


 


Related Articles:

Copyright, blogs and bloggers

How to add a gadget to your blog

How to copy and paste a website address on an Android smartphone

This article explains how to copy and paste a website address (URL) when you are using the Chrome browser on an Android smartphone.



Copy and paste on an Android phone

When you are using an Android cellphone, the usual way to copy-and-paste text is to "long-click" on one word, and after it is selected, drag the selector-bars at either end to select more of the text.

After this, you have options on a list at the very top of the screen to cut, copy and page.

But this doesn't work on the Chrome browser's address-bar, ie the place where you type in website addresses, or see the address which your currently viewed pages has.

Here, there is no long-click, and you have to use a slightly different approach.


How to copy a web-address on a Smartphone using Google Android and Chrome


1 Inside Chrome, go to the website and page that you want to copy the address from.


2 From the top right handcorner, choose the Overflow menu button: this is three vertical dots.


3 From the menu that opens, choose Share


4 choose Copy to clipboard from the list of sharing options.


Step 1: Choose Share

Step 2: copy-to-clipboard
Now, when you go into other applications and pages, you can long-press, and a small PASTE button will appear.   Click this - and watch your copied link get pasted.


Troubleshooting:

Remember that if it's a Blogger site that the link came from, you may need to remove the " /?m=1" from the end of the URL, for the sake of non-mobile users of the place where you are pasting the link.


How exactly is this a Blogger tip?

Fair question - this a blog about using Blogger, Google's website tool for the rest of us, not about Android phones!   But as more and more people are using mobiles (and mobile templates become ever-more important) I still think it's relevant - here's why:

Even with a new phone running a very recent version of the Android operating system, I still find it too hard to write anything exepct the simplest posts on the phone.

But I've found that I can do more and more of the promotional and social-media aspects of managing my blogs on the phone in my "spare mintues", eg while I'm on a bus, or sitting in a waiting room. Very often, this involves locating a blog-post which answers a question, and posting a short summary and link to the post there. An of course to do this, I need to copy the link to the post. So copy-and-pasting website URLs is now one of the tasks need to do fairly often.




Related Articles:

Making a social media / communications plan for your blog

Turning of Blogger's mobile template

Kategori

Kategori