Creating Sitemaps.xml file for Wordpress blogs on Azure Websites

When running Wordpress on Azure websites, you have the ability to create sitemaps. This enables search engines such as Google and Bing to make you content more discoverable. You can find out more about Sitemaps from Google.

The first step in the process is to upload placeholder files for the sitemap files. These are two files, Sitemap.xml and Sitemap.xml.gz (a compressed format). These files are both available on the Wordpress site, so download both Sitemap.xml and sitemap.xml.gz locally to your computer. For this example, our local directory will be c:\scratch.

Next, you are going to need to upload the files to your hosted Azure website. This requires using FTP. The Azure management site has the link to this.

 

Clicking the URL will pop up the FTP client in your favorite browser. I hate that FTP client (this hate is browser agnostic). Instead, I use the FTP client on the local OS, in this case Windows 8. Go to the command prompt and:

  1. Type ftp server.ftp.azurewebsites.windows.net
  2. Type in your FTP user name, being sure to include the domain name
  3. This will put you at the top level of your hosted Azure website. You can see the files there by typing LS (the UNIX version of the Dir command)

  4. You will need to change directories to the location on your server that is the root for Wordpress site, in our case that is wwwroot; cd site\wwwroot

  5. Now change your local directory to the location of the sitemap files you downloaded earlier using the FTP command LCD. This will change your local directory for you. In our example the location directory is c:\scratch, so LCD c:\scratch
  6. You can verify the files are present locally by typing !dir, which shells out to the command prompt
  7. For each file, type PUT filename;
    1. PUT sitemap.xml
    2. PUT sitemamp.xml.gz It goes without saying you can use your favorite FTP client to upload the files, I just made sure to document at least one.

Now that the sitemap files are present, you need to create the content for them. This can be done by installing a Wordpress plugin. The one I use is the Google XML Sitemaps application that can be downloaded here.

To install this on your Wordpress site hosted on Azure is easy enough. Log in as administrator to your account.

  1. Go to you Plugins and choose Add New and type Google XML Sitemaps and click search
  2. Click Install Now and move onto setup You will want to verify the location of your Sitemaps file, which the plugin automatically detect

 

The basic options are fine for most implementations. The Plugin will automatically create zipped up files of your sitemap, rebuild on content change as well as notify Google and Bing of changes

 

The plugin allows you to build the sitemap for the first time. After it is done, you will see

You can verify the sitemap by looking at the xml for the file. In the case of this blog, http://www.jptacek.com/sitemap.xml

 

 


 

Configuring DNSimple for Azure Hosted Domains

DNSimple is a great service for hosting and configuring DNS for domains you control. It also benefits by not being Go Daddy. I hate Go Daddy. They supported both SOPA and PIPA, run sexist television commercials and I have no love for their elephant killing CEO. Then there is their utterly confusing website, upselling tricks and poor customer service. Don't use Go Daddy.

DNSimple allows you to host up to 10 domains for $36 (USD) for the year. You can find pricing information at https://dnsimple.com/pricing. For multiple domains, this is significantly cheaper than Go Daddy.

Another nice feature of DNSimple is they have templates for many popular sites to configure all of the necessary DNS settings required for hosting. They have templates for Google App pages, Tumblr, Wordpress, etc. While I am a developer and tend to be technical, I get lost pretty quick in the world of DNS configuration. A records, CNAME, MX, etc, etc. The templates help users get up and moving quickly.

However, they do not have support for Azure hosted websites. It took me a little messing around to get this to work, and finally I have it set correctly.

First, for this to work. You need to be hosting your website in Shared or Reserved mode. Free mode will not allow for users to have a custom domain name. To do this, log onto the Azure management portal and go to Web sites and choose your domain. Click scale and configure either Shared or Reserved. Shared is going to be MUCH cheaper.

 

You will then want to configure your domain names. This is done by clicking Configure and Manage Domains

 

This will provide a screen for managing custom domains.

The instructions do a good job of telling you what do. You want to have any domain that you want DNS to resolve for added here. In IIS speak, these are the Host headers. You will want one for WWW and another for your TLD, jptacek.com in our case. The issues I ran into was jptacek.com not registering properly and did not redirect to the main site.

Next, you will need to configure your DNS settings in DNSimple. Go to www.Dnsimple.com and login. To configure your DNS, go to Domains, and select the Domain you want to manage

Once in manage, you will want to go the Advanced Editor, which is what to use when a template is not present.

In here you will add for records, three CNAME records and an A name record. First, add a wildcard CNAME and have it point to your azure hosted website.

Next, as mentioned on the Azure site, you will need a record that will verify you own the DNS. To do that, configure the AWVerify to point to Azure's service

Next, a third CNAME record for WWW that goes to the Azure site

Last, and this is the area I ran into issues, you need to create an A record for the domain that points to the IP Address provided by Azure. This can be found on the Manage Domain settings. This will ensure that a request to the top level site, jptacek.com, will redirect to your site. Be sure to leave your subdomain blank.

 

You may have to wait up to an hour for the changes to take effect. It is also good to flush your DNS to ensure no issues.

If you are looking for a DNS provider or want to switch from Go Daddy (which is horrible, have we mentioned that), check out DNSimple.com If you want, you can even click on the referral link https://dnsimple.com/r/b8a105607bde67, and get one month of free hosted DNS. Even better, I would get a free month of free hosted DNS J

 


 

The Pace of Innovation

Recently, The Economist magazine had a cover story on Innovation, with Rodin's The Thinker sitting on a toilet wondering "Will we ever invent anything this useful again?"

Economist-Innovation Cover

It is interesting to contemplate the pace of innovation and if we are slowing down.

At first glance, it just FEELS like we are slowing down. There is a great quote from Peter Thiel, who runs the Founders Fund, a venture capital fund, "We wanted flying cars, instead we got 140 characters." (New Yorker profile of Peter Thiel). That succinctly sums up the disappointment people feel about the progress of innovation.

You can also look back to our history to see this. In December of 1903 the Wright Brothers flew an airplane at Kitty Hawk. A (relatively) mere 66 years later, Neil Armstrong stepped onto the surface of the moon. Apollo 17 saw the last manned moon mission in 1972. In the ensuing 40 years, we haven't been back. I doubt we will be back in the next 24 either.

In 1900, the average life expectancy in America was 49 years. By 1980 that had risen to 74 years. In the ensuing 30 years, it has risen to 79 years. We can go on and find similar examples that provide the sense that we are slowing down.

There are several reasons for this I believe. The turn of the century was really the time when the benefits of the Industrial Revolution were realized. The advances in Steam Power and mechanization during the early years of the Industrial Revolution gave way to the widespread access to electrical power and lighting in the early half of 1900s that significantly changed the pace of society and saw significant increases in GDP per person (one measure of Innovation) during this time. Economists generally believe similar increases occurred during the period of our history when we moved towards and Agrarian society (a time in which the world obviously did not have a concept of GDP).

In a sense, the pace of Innovation was easier. At the beginning of the Industrial Revolution, the solutions were more readily discovered. However, as we acquire more knowledge and expertise, the barriers to entry become much more difficult. When I was in college, I flirted with idea of studying Astrophysics. Ultimately, I decided not to, and part of the reason was in talking to professors it became apparent that you really needed a PHD to find a job. In talking to the PHD students I realized I had years of to prepare myself for a PhD. A good part of this time involved acquiring the math background I would need several math courses to start the graduate classes, despite having an undergraduate degree in Applied Mathematics. I was unwilling to invest more years of mathematical study just to get into a graduate program.

The Economist article refers to this as "burden of knowledge". The more knowledge we have on a subject, the longer it takes to get proficient. The article states that the "age at first innovation", when someone contributes something new, rose about one year between 1985 and 1997, a period of 12 years. And during the last 15 years, things haven't moved any slower.

So is there no hope for the future? Of course not! Two things I think it is important to take into consideration.

First, we are in the midst of moving from the Industrial Age to the Information Age, and we are at the beginning. As we move to fully realize the benefit of the Information Age, we will see significant gains, similar to the benefits realized as a result of being fully engaged in the Industrial Revolution in the early 1900s.

"Digital Natives", today's students, have grown up immersed in the technology and I believe it will change the way we work and learn. Take for example, my daughter, an 8th grade student. She recently had a homework assignment to solve America's Debt Crisis. As part of her work and research for her presentation, she reached out to economists at both Lawrence University (located in Appleton, WI) as well as Harvard University. She also reached out to our congressman, Reid Ribble. All of the people she contacted replied to her with valuable information used in her presentation. For many students, it is first nature to bypass the geographical or communication boundaries that many of us grew up with. They are also used to using distance learning and communicating via video with things like Skype or Google Chat. I believe, this is going to fundamentally change how we work. So much capital is spent on classrooms to learn in and offices for people to work in. As "digital natives" move into the workforce and bring a high level of comfort with distance working, and then become managers, organization will spend less on infrastructure for offices and the like and be able to apply more resources to applied research in their environment. Second, these distance workers also have a MUCH shorter commute. Many people will find extra hours in their day that will also have a positive effect on per person GDP. We will never remove the need for face to face communication, but we can certainly realize benefits of a global network and communicate more efficiently.

Second, it is always darkest before the dawn. I say that half jokingly, but I am always reminded where we were with Physics study at the start of the 20th century. With the discovery of Maxwell's Equations, physicists believed they had essentially come to the end of the road. The basic forces of the universe, like electromagnetism and gravity were well understood and described the world with precision, precisely the goal of physics. The only thing remained was this pesky issue with the model for the atom. That issue though led to Einstein and his changing the world with the discovery of the photoelectric electric that began Physics on the path to quantum mechanics. The discovery of quantum mechanics in turn lead to solid state physics and the chips that are driving today's information age, not to mention a whole host of other technologies that resulted in immense economic gains.

The thing about innovation, true innovation, it always comes unexpectedly and in ways we can never anticipate. We can all pretend we have crystal balls and can see what the future will be. At best though, we can make educated guesses. Rest assured, there will be technologies that come in disrupt the world and will profoundly change the way we live.

What are steps we can take to facilitate innovation? First off, education. I am not necessarily saying spend more on education, but challenge our students earlier with the topics they need to help them be prepared in science and math. Earlier introduction of these topics, especially classes such as Calculus, ensure our students are able to try and overcome the "burden of knowledge" by starting out with a stronger base at a younger age. Second, continued investment in basic science by governments. The space program was an economic engine for decades that drove innovation. The government's investment in a redundant data network resulted in the Internet which is driving today's information revolution. The ROI on basic science research can be too long for the marketplace to invest in, but when measured in years and decades, the impact to the economy can be massive.

Is Innovation dead? No. Is it slowing down? It may be by some measure. However, I believe we are on the cusp of another great wave of GDP growth as the fruits of the Information Revolution emerge. I am excited to see what is coming next!

This blog post originally appeared at Skyline Technologies


 

John Ptacek I'm John Ptacek, a software developer for Skyline Technologies. This blog is my contains my content and opinionss, which are not those of my employer.

Currently, I am reading The Dark Forest by Cixin Liu (刘慈欣)

@jptacekGitHubLinkedInStack Overflow