Can’t change the Page Title in Apple iWeb

Apple iWebDescription:

In iWeb the page title (the text that appears at the top of the browser window) cannot be set easily within iWeb itself.

Symptoms:

  • When you publish your website that was designed iWeb the page title defaults to the text at the top of your first page.
  • Changing the Page Name through the Inspector has no effect on the Page Title in the browser

Explanation:

The page title is not easily customizable in iWeb’08 and so must be set using javascript.  Normally the title is derived from the HTML code – the <title> tag but iWeb doesn’t allow the user to change that directly.  Below I have documented how you can use javascript to achieve the same effect..

Solution – Set the Page Title using Javascript

  1. In iWeb, open the page you wish to set the title for by selecting it in the left hand navigator
  2. When the page appears, click ‘Web Widgets’ at the bottom followed by HTML Snippet
  3. Paste the following text into the box that appears:
  4. <script type=’text/javascript’> parent.document.title=”My Page Title” </script>

  5. Change the text “My Page Title” to whatever you would like as your page title
  6. Click ‘Apply’ and then move the little box that was created up to the top left hand corner of your page to get it out of the way
  7. Save & Publish your web site
  8. Now your page title should appear as you have set above
  9. For your other web pages, you can just copy and paste the little box to all the other pages

 

Save/Share


41 Responses to “Can’t change the Page Title in Apple iWeb”


  • I tried using this one before and it didn’t work. So this time I replaced the single quote marks with the double quotes and it worked. Here’s the adjustment

    parent.document.title=”My Page Title”

  • Comment fromChris

    This is just what I was looking for. But any idea how to get the new widgets for older versions of iWeb? I’m running 1.1.2 (2006) and there don’t seem to be any.

  • Comment fromSteve Mouzon

    I’m still not getting it to work. Does it matter where on the page that I put the snippet? I’ve tried it with both single quotes and double quotes.

  • Comment fromRosco

    Hi Steve..

    Sorry to hear this is not working for you yet. Can you tell me what version of iweb you’re using? What title is actually showing up?

  • Comment fromEddie

    Not working for me either. I’m using iWeb 09 version 3.01. And the widget I used is called HTML Snippet. I put it in the upper left hand corner and resized it smaller too.

  • Comment fromRosco

    Hi Eddie…

    I’ve just had a look on here. These instructions were originally written for iWeb 08 but it should be similar. I’ve just tried it on iWeb ’09 and the HTML Widgets are on the right panel. I simply open a page I want to change the Title on > double click the HTML Snippet widget on the right side > paste in my javascript (as above) > click apply > move the little box to the bottom of the page and then publish the site. It works then. A few things to look out for:
    If you’ve more then one HTML Snippet on the same page then paste the code into the HTML snippet closest to the bottom of the page or move your snippet to the bottom of the page as it reads the html from top to bottom.
    When you view your web page have a look at the Page Source and see what’s between the tags. Post back your results. Hope this helps. Rosco.

  • Comment fromAshley

    I, too, am having a problem changing the title. It seems to be stuck on one I originally had typed in, but with a typo. It’s stuck on “Letter of REcommendation”. I’ve tried the instructions with one quote and two. I’m using iWeb ’08. Is there something I’m missing?

    I paste the code in the black box that appears above the html box which resembles a text box. Correct? If you double click on it, it turns blue. I’ve tried it many many times with clicking on box, without…pasting it in black box or html box. I must be missing some step in this, but please help. I have to get this thing out and can’t do it with a typo. Thanks to any who can help!

  • Comment fromRosco

    Hi Ashley

    What’s your web address?

    I want to take a look at the source code.

    Rosco

  • Comment fromRosco

    Hi again Ashley…

    I found your page and took a look at the source code. I noticed a few things..firstly you’ve put in two of the scripts and secondly the code looks slightly wrong. Also, I noticed you’ve made the same error with the work ‘REcommendation’ in the box on the left side of your page…is this deliberate?

    As a test, try to create a new blank page on your site and view it. See what the title is. The edit that page and insert the script code as per my instructions (try to follow the instructions i posted in the comments above to Eddie – these are for later versions of iWeb) and then test the blank page again to see if it took effect.

    Let me know how you get on.

    Rosco

  • Comment fromAshley

    Rosco,
    The box on the left side of my page? As in the tab for Firefox or the top of page in Safari? “REcommendation” is my achilles heal right now.

    I apologize if I sound naive, but I’ve only used iWeb for about two days, so some of what you are writing goes a bit over my head. I’ve just been wiggling my way through based on what I’ve already done in the past with Keynote and Pages, etc. It’s rather intuitive, but clearly I’ve wandered into unfamiliar territory.

    So, when you say that I’ve put in two scripts I don’t know exactly what you are referring to. And, which code looks slightly wrong? The code for changing the title of the page? Other than using what is there naturally, I have only tried to change the code per your instructions which I copied and pasted, so I must have done something wrong somewhere along the way.

    I did read the instructions for iWeb 09 above to Eddie, but my set-up fits the description of the 08 fix. I will follow your instructions by creating a new page. BTW, I did rename other pages and they worked competely fine. Strange to me. Okay, I’m going to try your fix now. I feel like my last resort is to create a new page altogether and recreate the page, but wondering if it still would be there?

    Thank you so much for helping me!
    Ashley

  • Comment fromAshley

    Oh my gosh! The weirdest thing happened. I created a new page as you said…the same way I did it before from a “blank” template that came from the 1.0 themes, “modern” “blank”. It has a picture of a guys’ eyes with nothing else, but TEXT is written to the lower left side of the guys’ picture. And, what do you know, that was the title of the page “TEXT”. When I realized that was where it was pulling the name from, I changed it in the template and it changed in the title page after saving and publishing. Does all this make sense? It all happened when I used the template but then deleted the text box so could never fix it again. I’m sure I’d be better off creating a blank slate some other way, but not sure how. Pretty much I did everything on my own and just want a blank page to start with. This seems confusing as I write it, but makes sense to me. So, any ideas where you can get an absolutely blank page so I can avoid having a name I can never change again?
    Thanks!

  • Comment fromAshley

    Since I don’t think I said this thoroughly enough last entry wanted to add a “thank you” again. I do appreciate it!
    Ashley

  • Comment fromAshley

    Okay, so I’m sorry to post four times, but this is a mystery really solved for me now! I had not looked at the site on a PC until now when using bootcamp to go into my windows side and upon doing so realized that my fonts did not translate and that the REcommendation you were referring to was masked by the font I used. On my mac and iphone it was looking as I intended. I now know to go back in and change it. I think I see the other phantom writing you were seeing that never has shown up on anything else I’ve done. The whole site in general runs very sluggishly on the PC…kind of upsetting as it looked so great on my computer. Oh well. Thanks again for your help. Perhaps I still haven’t learned this correctly, but I’m catching on quickly to the snaffoos.
    Thanks!
    Ashley

  • Comment fromRosco

    Hi Ashley!

    Wow – you’ve been busy. :)

    Well done on getting your problem sorted. I hope your 4 comments above can help others also!

    On the sluggish on PC issue – can you elaborate on this? Are the pages slow to load? Using IE or Firefox? Have you tried both? Do other sites load slowly on the PC (i.e. maybe it’s the PC not your site!). If you have decided it is the pc then it could be that you are using images that are a bit big in terms of file size…

    Try running your pages through this site: http://websiteoptimization.com/services/analyze/

    This will give you a report and tell you if there are any images, scripts, etc that are too big and slowing the site.

    I used to use iWeb myself for my site (i.e. the one you’re looking at right now) but I too found that it was a bit slow and rigid so I moved to WordPress which is fantastic and very easy to use.

    Rosco

  • Comment fromagneta

    Hi
    I have the same problem – can’t make it work with Iweb 09 and the Jave Script and I don’t understand how you solved it?

  • Comment fromNick

    I’m having trouble too – the title won’t show up after publishing – having followed all the instructions. I’m using iWeb ’09. Any ideas?

  • Comment fromRosco

    Hi guys…
    I’ve spent some time looking into iWeb ’09 which is apparently different from previous versions in the way it handles the Page Title.
    From what I can tell, iWeb takes the page title from three places as I’ve illustrated in this screenshot: http://www.flickr.com/photos/proposedsolution/3991367244/sizes/o/

    You can prove this yourself by simply adding a new page to your site and play with the default text containers it gives you. Try changing them, deleting the one I’ve marked 1st preference and watch your Page Title change to the 2nd Preference and so on…The 3rd Preference one is actually the Page’s Name/Label that is displayed in the left navigator and also in the Page’s Inspector box and this cannot be set to BLANK so this is your last place to change the Page Title.

    It looks like the javascript fix I’ve posted in this article only applies to versions prior to ’09 but I’m sure someone will find an alternative method.

    Hope this helps.

    Rosco

  • Comment fromNick

    Hi Rosco,

    Have managed to get it working using this script – not sure if it is different, but it works now. Perhaps it is space sensitive or something – or just iWeb being buggy? Thanks for your help anyway!

    parent.document.title = ‘INSERT TITLE HERE’;

  • Comment fromNick

    oops this comments box doesn’t allow javascript – therefore the script I used doesn’t show up here!

  • Comment fromRosco

    Hi Nick, Thanks for your comments.
    Can you tell me where on your page do you have the HTML Snippet?

    Rosco

  • Comment fromNick

    ***
    parent.document.title = ‘nickhinton.com: Songwriting, Music Composition, Arranging & Sound Design for Film, TV & Media’;
    ***

    about half way down the page on the left – x:45, y:496 to be exact! ;)

    I also have another HTML snippet running a Quicktime movie – which is above that on the page.

  • Comment fromRosco

    Thanks for the response Nick.

    The reason I ask is because I believe placing the Snippet lower down the page will make it work as browsers read the page from left to right and top to bottom so placing the HTML snippet in a lower position than any of the iWeb containers that it reads by default should over-ride them.

    Thanks for your contribution. Hopefully this will help others with the same problem.

    Rosco

  • Comment fromNick

    yes, I think that’s right – as my site will try to load the title “home” at first – you can see it load as default – and once everything has loaded, the javascript over-rides this title and the correct title shows up…

    Thanks for the tip!

  • Comment fromCarl

    Hi Rosco,
    Thanks for all your posts on this problem. My web-site has several pages. Most are ok, but the others behave IAW your 10/7/09 Flickr illustration post. Its interesting to note, that all my problem pages are either videos or photos, and all but one chose your preference #3. The rational for iWeb rejecting preference #1 is beyond me. Perhaps Apple can explain or fix this bug soon.

    Before I try your HTML snippet solution, I wanted to ask if anyone has considered RAGE’s (www.ragesw.com) “iWeb SEO Tool”. It’s free, well documented, and it appears to have simple provisions for editing individual iWeb page Titles. The PDF manual appears well written too.

  • Comment fromHelvetica

    Works great for me after replacing the single apostrophes with quote marks in both places so it looks like this: parent.document.title=”My Page Title” Thanks for the script. This was driving me crazy.

  • Comment fromDarren

    I can’t seem to get it to work. I’ve tried everything you guys are saying but its still not working. I’m using iWeb 08. Here is a link to the homepage I’m testing this one: http://web.me.com/dtessitore/ITD_Solutions/index.html

    Maybe because I have 7 other scripts running on this site.

  • Comment fromPam

    Hi, Rosco,

    I could really use help too and was very excited to find your site. I have tried every variation I can think of in case my first understanding of the posts above was wrong, but I’m stuck. I will chose a real page title when I prove this will work for me, but since I have only a little experience with html and iWeb, I guess I need you to look at the source code for my home page. At the moment I tried to set up the title to just be “Wick”, and I wasn’t sure whether “parent.document.title” should be left as is, or changed to the title shown at the left in iWeb.

    I did search for the source code, and it doesn’t appear to be there, so I’m guessing that’s the problem, but I did hit “Apply” and can’t figure out what it could be. I successfully put other html on the page, but I remember some kind of odd thing when I did it.

    On a side note, I was using GoLive and was following the convention “/index.html” but this doesn’t seem to be the way to go with iWeb. I would think that a shorter web address is better, though…? I am also not sure that I have site publishing settings the way they should be, given the repetition evident below…

    This is a “hidden” portion of my website, by the way, thus the odd name:
    http://www.adimlyburningwick.com/review/temp/adimlyburningwick.com_review_temp/A_Dimly_Burning_Wick_Children.html

    Thank you!

  • Comment fromPam

    A couple of related questions that occurred to me as I struggled on:
    Will the box appear on the screen or only affect the page title? (I’m not clear on this.)
    A lot of the sites I’ve found on how to prepare your site for search engines seem quite outdated – how long can the page title be?
    Also, how many characters in the front are likely to be picked up on screen in things like Google?
    Are their other ways with respect to text placement currently to get out information about your site clearly to the search engines? (My book covers a range of subjects, so just using a couple of words or a book title isn’t very adequate.)
    Also, is all this best done for every page, or just the homepage?
    Thank you so much!

  • Comment fromPam

    This is the current page (disregard links above please).
    http://www.adimlyburningwick.com/wick/A_Dimly_Burning_Wick_-_Memoir_of_the_Children_in_the_Ruins_of_Hiroshima.html

    Also, is there any way to drop the folder from the url (“wick/” in the above example)?
    Thank you.

  • Comment fromJohn

    Hi,

    This solution was not working for me either, using iWeb ’09 v3.0.1. The problem was due to the use of the ticks, around both the example title text and text/javascript string. The ticks are a combination of backward and forward ticks. Once I replaced the ticks with double quotes, for both strings, it worked fine for me.

    parent.document.title=”My Page Title”

    Hope this works for you too.

    Regards,
    John

  • Comment fromJohn

    Just to be clear on my post above, in my case, the double quotes have to be around both the script type string and title, i.e.

    type=”text/javascript”

    parent.document.title=”My Page Title”

    Regards,
    John

  • Comment fromDwight

    Hi, I’m using iweb 09 3.0.1 and the script above wasn’t working, then I entered this one from another forum and it worked:

    parent.document.title = ‘ya di da di da’;

    I don’t see a difference.. but it works, so whatever..

  • Comment fromJohan

    The double qoute ” around text/javascript and the title text works for me. Also leave a blank after the = but NOT before.

    Thanks a lot for this thread!

  • Comment fromClay

    I’ve just used this method with iWeb ’09, and it worked perfectly (double quotation marks around the “My Page Title”.
    Thanks

  • Comment fromDoug

    Yep, the double quotes around both is the trick. Works great!

  • Comment fromDamian

    parent.document.title=\Insert title here\
    YAY double quotes around both works for me.. iWeb 09 Version 3.0.1..
    FINALLY!
    ugh..

  • Comment fromKevin

    Great solution! Thanks so much!

  • Comment fromRandi

    Hi,
    Thanks for all your advice on this topic, but unfortunately, no matter what I do I cannot get the title page to change. I’ve used the Rage SEO and those title tags are visible only when my pages are loading, but when they land, I get an old title that was originally somehow created at the initial stages of this build. Can’t get rid of it and can’t figure out why. Any help would be appreciated greatly!!!!

    Thanks so much!

  • Comment fromKevin

    Make sure you change ALL the single quotes to double quotes. It won’t work unless you do.

  • Comment fromAndrea Reed

    Amazing! I have been trying to figure this out for years! Thanks!!

  • Comment fromMichelle

    Great workaround once you get to the posts that point out replacing the double quotes! Thanks for posting this page and to all who made comments.


Leave a Reply


 


Performance Optimization WordPress Plugins by W3 EDGE
אורן יומטוב