Half-Elf on Tech

Thoughts From a Professional Lesbian

Tag: domain

  • Subdomains Back Where They Belong

    In my last post, I talked about how I did something dumb with my subdomains.

    How did I install subdomains?

    Stupidly. Or rather, stupid for DreamHost. See, many other hosts, when you make a subdomain, come up with this structure for your files:

    /home/ipstenu/public_html/
                             /subdomain1
                             /subdomain2
                             /addon.com
    

    So when I made my subs, I made them similar to that. What DreamHost does is this:

    /home/elftest/elftest.net/
                 /db.elftest.net/
                 /addon.com
    

    I suggest you do the default! If you didn’t, however, there is a way to fix it. It’s a two step process.

    1) Move the files.

    I found it easier to do this in Unix $ mv elftest.net/trunk trunk.elftest.net (this moves and renames all in one). If you wanted to do it via FTP, just drag and drop, then rename.

    2) Change the location in Panel.

    Go into your panel, edit the domain, and change elftest.net/trunk:
    before: elftest.net/trunk

    To trunk.elftest.net:
    after: trunk.elftest.net

    Give it 5 to 10 minutes, and you’re done!

    tl;dr to the whole thing is this: Trust the tool! (Sharon, that was for you!)

  • phpMyAdmin vs CMS

    By ‘CMS’ I mean WordPress, Drupal, whatever.

    So here’s a funny. I moved my DreamHost site to a VPS, so I could learn nginx (I’m still a newb) and suddenly I couldn’t get to my phpMyAdmin anymore! Before someone says it’s DreamHost’s fault, this is actually due to how I installed subdomains (which I don’t recommend) and configured nginx (still optomizing). That said, not every CMS is flexible enough for this, so if you have this problem too, here’s a work-around.

    As you know, you’re supposed to go to http://mysql.elftest.net which then sends you to http://elftest.net/dh_phpmyadmin/mysql.elftest.net/ to get to your phpMyAdmin page. Except it gives you a 404 styled like your site instead.

    Solution? Make a fake subdomain.

    I made db.elftest.net (which has nothing), but now I can go to http://db.elftest.net/dh_phpmyadmin/mysql.elftest.net/ and log in!

    How I buggered my subdomains, and how I fixed it, is another post.

  • WordPress Multisite Subdomains Without Wildcards

    The easiest way to run a Multisite network with subdomains is to use wildcard subdomains, because they’ll automagically map anything.yourdomain.com to yourdomain.com and WordPress will in turn translate that for you.

    When you’re on shared hosting, you can’t do that. But don’t worry! If you’re willing to do it manually, every time you have a new subdomain, you can still have subdomains! This is really easy, if weird.

    Go to manage domains on your Panel and click on ‘Add New Domain / Sub-Domain’

    Add your subdomain as ‘mysub.yourdomain.com’ and check the box to remove www (it’s a subdomain, you don’t need it, and it causes weird issues with some plugins).

    Set the Web Directory to where you have your main domain installed (normally this will be /home/username/yourdomain.com ) – yes, I really mean exactly the same. This is what wildcards do for you, but since you don’t have it, you need to do this. It should look like this:

    That’s it! Now you just scroll down and press Fully Host This Domain and wait till it’s provisioned. Once that’s done, you can go to mysub.yourdomain.com and it will take you to yourdomain.com! Add in a subdomain within WordPress called ‘mysub’ and everything will work exactly like it should.

  • Don’t Use WWW

    Don’t Use WWW

    It was asked why I don’t recommend using www in your URL for Multisite in WP Multisite 101.

    To quote me:

    You should not use www in your URL
    A lot of people complain about this. The simple fact is that any well built server will automatically redirect www.example.com to example.com seamlessly. By removing it from our install, we avoid any possible conflicts with subdomains. Your SEO will not be impacted.

    What I didn’t say, but I told the fellow with the question, is that some servers see www as a subdomain, and not an ‘alias’ (for lack of a better term) of example.com, which is my main reason for not using it. I’ve also seen a very rare, but infuriating, problem where, after upgrading, a site that happens to use www in their URL can no longer get to the network admin page, and instead gets a redirection loop. Since this only happens with www in the URL, and never when it’s not, it’s safer to drop the www.

    I’ve never yet heard a good technical reason to use it, though I do totally accept ‘But I like it!’ as a justification. Everyone has a preference. I don’t feel that the www makes your site more or less professional, mostly because I don’t think anyone really looks except, maybe, you. As long as the redirect is seamless, the user will never notice, and 99.999% of them won’t care. Yes, Google and Facebook both use the www, though newer sites like Tumblr and Twitter don’t. WordPress doesn’t, but I’ve been advocating no-www longer than I’ve used WordPress.

    My technical reasons for not using it stem from the No WWW guys.

    By default, all popular Web browsers assume the HTTP protocol. In doing so, the software prepends the ‘http://’ onto the requested URL and automatically connect to the HTTP server on port 80. Why then do many servers require their websites to communicate through the www subdomain? Mail servers do not require you to send emails to recipient@mail.domain.com. Likewise, web servers should allow access to their pages though the main domain unless a particular subdomain is required.

    Succinctly, use of the www subdomain is redundant and time consuming to communicate. The internet, media, and society are all better off without it.

    To explain what that means, www used to be the protocol to say ‘If data comes for www.example.com, it’s web traffic.’ Similarly, mail is the protocol for email, and mail.example.com sends traffic to your mail server. You could email me at mail.halfelf.org. And the point of all that all web browsers today know that http://example.com is a website. In fact, you can just type example.com into any browser, and it’ll know ‘Oh, this is a website.’ How does it know that? Because you’re in a web browser.

    It’s like when you dial a phone number, you don’t have to press a button to say ‘Phone number.’ Look at your cell phone. If you open up your text messaging app, enter a cell phone number, and send a message, the phone magically knows ‘This is a text!’ and sends it. But if you open the phone app and enter the exact same number, it knows ‘This is a phone call!’ You, the user, have to do nothing.

    That www in your URLs is telling the browser something it already knows. It’s redundant, it takes up space, and it’s unnecessary.

    Now people I respect, like Michael Hampton, maker of Bad Behavior (my out and out favorite add-on to any PHP web app), is the brain behind Yes WWW. His counter argument concludes with:

    The main reason I argue for leaving the www. in URLs is that it serves as a gentle reminder that there are other services than the Web on the Internet. Some of these, such as FTP and DNS, users typically use transparently without even realizing it. Others, such as e-mail, users access through separate applications. Even so, I know of many users who will claim with a straight face that e-mail is not part of the Internet.

    While I disagree (mostly since, if that holds true, we should use mail.example.com and so on), the question comes up that if we’re not using www, how do we differentiate between http://example.com and ftp://example.com in cases where they’re not on the same server? You can, easily, redirect ftp.example.com to a different IP, if needed, via DNS. Thankfully, there are some easy answers to this. First, you can route the requests via ports. If a request comes via FTP, that’s a different port, send it to the other server. What you can’t do, however, is serve HTTP and FTP over the same port, but … you shouldn’t do that anyway.

    There are many personal reasons to use www or non-www, and they are all perfectly valid. But there’s on big technical reason I would never consider it on a Multisite install of WordPress. Once in a blue moon, after an upgrade, someone finds out they can’t get to their network admin. This is, normally, due to a miss-match in URLs, where they’ve put http://example.com and http://www.example.com for their site and home URLs, back before they turned on Multisite. Fixing that is a monumental effort, and it doesn’t always take. (This is probably related to http://core.trac.wordpress.org/ticket/9873 now that I think about it.) Also, even more rare is the case where just having the www forces your subdomains to be subdomain.www.example.com.

    Both situations are frustrating. Both are avoidable by using just http://example.com

    As long as you redirect the www to non-www, your users will never notice. Except the geeks like me. And while we may disagree, it’s unlikely we’ll stop using your site over something that trivial. Go www free. It’s the way to be.

  • Stop SOPA And Change Your Registrar

    Stop SOPA And Change Your Registrar

    If you have no idea what’s wrong with SOPA, just Google it.

    GoDaddy, a pretty well known domain registrar, not only supports SOPA but helped write it. While in recent days they’d stepped back, it got me thinking. I left GoDaddy years ago, when one of my domains was almost up for renewal. I switched it to NetworkSolutions, which was where my other two domains were.

    History. When I first purchased ipstenu.org (08-Sep-1999 00:09:50 UTC) we got domains by filling out a web form, getting an email with a PDF, printing it up, singing it, photocopying our drivers license and faxing that back in. Then, if you didn’t actually have a drivers license, you got a phone call and a fun chat with a woman about what was going on, yes, the state ID was fine, the domain will be set up in five days. A year later I bought another domain, and since I had an account with NetSol, it was as simple as ‘I want that one,’ and I was done.

    When I got my third domain, I used GoDaddy since it was cheap, easy and fast. Click, click done. In 2008 or so, all the news about GoDaddy’s rampant sexism and general asshattery ended up with me transferring off GoDaddy and onto NetworkSolutions. Except I didn’t. I had a friend do it, since he and I were trading favors. So up until December 27th, 2011, I’d never actually transferred a domain name!

    It’s still weird, and reminds me of the fax days, but it’s pretty easy.

    It’s not that I was having any issues with NetworkSolutions. But their statement on SOPA, while anti-SOPA, still sat in my craw a little. Basically they were chickening out, and while I was pretty sure my domains were fine (and my relationship with NetSol), it was one of those days when I felt like I needed to make a change.

    Namecheap has been on my radar for years. I’ve had an account with them, and no domains, for most of 2011, since the last time GoDaddy got stupid. See, I raise a lot of money for charity, and one of the things I raise money for is elephants. I want them out of zoos and I want them out of circuses. So when I saw GoDaddy’s founder hunted elephants, I had no choice. I couldn’t be a hypocrite and I had to turn my back on GoDaddy. When I decided I should move from NetSol to someone a little friendlier, whom I felt I trusted as people (that’s a huge deciding factor for me) and who had a good rep, I decided to turn to the people taking ruthless advantage of GoDaddy.

    Like Namecheap.

    See, they hate SOPA. A lot. Enough that between the $20 credit I had from them (for playing Internet games) and the $7 SOPASucks discount they were offering, it would cost me a grand total of $1.01 to move my domains over. The only time I’d ever worry about moving my domain names is if my DNS (i.e. the nameservers) were run by them. They’re not, they’re run by me, which means a transfer like this is all paperwork. No downtime, nothing to fuss about except the waiting.

    All the politics aside, if you have no problems with where you registered your domain, and can do everything you want, then there’s no reason to move. I mean that sincerely. I feel that way about webhosts, and all things computer related. If there’s no compelling case for you to move, stay. If there is, though, moving your domain registrar is actually a lot less scary than moving hosts!

    There are a few rules about moving domains. Like you can’t make a bunch of edits to your registry info and then move (it looks ‘suspicious’), and there are date ‘blocks’ on certain things that make you wait 45 days. But assuming, like me, you’ve had the same registrar since the dawn of dinosaurs…

    Step 1) Turn off domain protection from your existing host.

    Makes sense, you’re now setting it up for people to ask if they can have your domain. In the case of NetworkSolutions, you have to check a box to get an EPP Key (Authorization Key). Save that Key, you’ll need it in a minute.

    Step 2) Turn off any WHOIS protection you have.

    If the transfer company can’t see who you are, they can’t add you.

    Step 3) Go and request the domains be transferred over at your new registrar.

    Dead simple. You add the domains, the new guys send an email. You read the email, visit the webpage and click “Yes, please. I want you to be my boss.” This is ‘Fax Number 1’ in the old day.

    Then you get another email, this time it’s the old domain register. “Oh noez! Why you leave me?” they wail. Or rather ‘Are you sure?’ Click yes again. This is Fax Number 2.

    Step 4) Wait up to 5 days.

    And write a blog post.

    My move isn’t done yet, but it’s ‘in transfer.’ While I understand why we have the back and forth’s of the emails (faxes) to make sure I’m really me and I really requested this (remember, I work at a bank in my day job), it’s still odd that after the approval is done, it’s a 5-day wait.

    But there you are. That’s how (and why) you should switch your registrar.