Skip to Content

Planet Drupal

Syndicate content
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 9 hours 12 min ago

Drupal Watchdog: MySQL Query Optimization

13 January 2015 - 9:52am
Feature

A large part of MySQL optimization lies in improving poorly performing SQL queries. While tuning is important, it often has nowhere near the impact of actually fixing a poorly performing query. Fixing queries is also a lot more fun. Obviously query optimization is a large subject, and can’t possibly be covered in full in a single article. I highly recommend that you get a book on this subject; for any Drupal developer, it is well worth learning.

As a web developer using a CMS, you are only slightly removed from the SQL layer. Not completely knowing how to use this layer and how to optimize it is very limiting. To get you started, we will cover some very basic optimization, index usage, and join optimization techniques.

Index Basics

Even though indexes are very important for database performance, they are not completely understood by many developers, which often leads to easily-avoidable problems. The main issue is the mystical belief that the MySQL optimizer should be able to quickly run a query if an index so much as touches the columns in question. Sadly, indexes are not magical.

It is best to think of an index as a tree, largely because they are trees in most DB systems. (B+Trees, specifically; for more information, see http://wdog.it/4/1/btree.)

Thus, if you have an example index test that covers (columnA, columnB), you literally have a tree of columnA values, with columnB values in the leaves. If you have a query that has a WHERE condition on these two columns, MySQL will go through this tree looking for the correct columnA value first, and then go into the leaves of that object, and find the correct columnB value.

Categories: Drupal

OpenLucius: Drupal Grants, what to do with this node access system?

13 January 2015 - 8:48am
Viewing, editing and deleting pages in Drupal

When you have some experience with Drupal it will be clear that you can set your rights for content management in the permission table (/admin/people/permissions).

Check the appropriate permissions and everyone will get the required rights to view, add, edit or delete content. In other words the so-called CRUD actions: Create, Read, Update, Delete.

So far so good.

Categories: Drupal

ERPAL: Looking back on 2014 with Drupal business apps

13 January 2015 - 7:30am

The year 2014 was entirely about flexible and open business applications based on Drupal - and we’ll continue to follow this vision in 2015.
In 2014 we staffed up our ERPAL team and won strategic clients who gave us feedback and helped us continue to finance our open source development. This positive resonance provides confirmation that Drupal can become an ever-larger part of the open source business application market.
One of the ERPAL Platform projects of 2014 that we’re very proud of was presented in a featured webinar on open integration with Drupal commerce. The ERPAL Platform based foam creator gives an industrial company the means to let its clients construct and order individually manufactured products – all directly online. The orders are sent to the manufacturing department and production starts. Because the application is fully integrated with the company’s workflow and IT infrastructure, no manual data transfer is needed and the efficiency of the whole sales-to-production process has increased by more than 75%. This unique use case shows the power of Drupal extended well beyond content sites.

Whereas other open source business apps like Odoo focus solely on broadening the palette of business apps available for ERP systems, ERPAL comes from the other direction. We use Drupal as a highly flexible and stable application framework that helps you build any kind of web application at all - and Drupal can do this with almost no coding, just by configuring. Using this strategy we introduced Drupal to some businesses that hadn’t even heard of Drupal. And now that they see its power and flexibility, they wouldn’t want to go without it anymore.
With ERPAL Platform, which we released in 2014, we provide Drupal developers and site builders with a free Drupal distribution for building highly flexible business applications and e-commerce businesses in a Drupal box. It integrates many Drupal modules like Drupal Commerce and Rules, which are known to leverage flexibility. With the help of the Drupal community we implemented an architecture that covers contact management and all components of the sales process such as quotes, orders and invoices. As Drupal became more open, providing web service for all entities in Drupal 8, we implemented the architecture of ERPAL to integrate with other services. Together with a closed beta customer test pool, we are running ERPAL Platform as a fully-integrated agency platform, automating integration tasks between Jira, Mite, Trello, Redmine and toggle. It helps save time in administration and automates billing and controlling processes in project-based business. Thanks to everyone who joined our ERPAL Platform integration survey. This survey is still open and we are looking forward to even more feedback to help us increase our number of beta testers.

Because in 2014 we were deploying more than 25 Drupal-based business apps and always had Drupalgeddon in mind, we decided to go public with our technology for Drupal update automation, which we previously had used only internally for our clients. Drop Guard lets Drupal users and agencies automate Drupal security updates immediately after a new security update release. If you’re interested in further details, workflows and technology, read more in our blog post about how since 2012 we’ve automated Drupal security updates with ERPAL: you can too!

All in all, 2014 was an amazing year for ERPAL and we saw that there’s a market for open source business applications. We’re looking forward to contributing even more code, know-how, webinars and sessions to the Drupal community in 2015.

Categories: Drupal

Drupalize.Me: Changes in the Form API in Drupal 8

13 January 2015 - 6:13am

In my previous post, I documented the first of my Adventures in Porting a D7 Form Module to Drupal 8. In that article, I documented how I used the Drupal Module Upgrader to convert my Drupal 7 module, Form Fun, to Drupal 8 and what I learned along the way about how Routes and Controllers replaced hook_menu, and what I gleaned from change records about other API changes. This article is a continuation of that post, so you might want to pop over and give it a read so that you're up to speed with what we're doing here.

Categories: Drupal

DrupalOnWindows: Setting up Code Syntax Higlighting with Drupal

12 January 2015 - 10:00pm

While setting up (still in progres..) this website we found the need to enable easy Code Highlighting to be done through our WYSIWYG editor of choice: CKeditor. What looked like a 30 minute task, ended up in a more than 3 hour adventure. Let's see what happened.

Language English
Categories: Drupal

Liran Tal's Enginx: Drupal Performance Tip – be humble on hook_init()

12 January 2015 - 8:06am
This entry is part 5 of 5 in the series Drupal Performance Tips

In the spirit of the computer video game Doom and its skill levels, we’ll review a few ways you can improve  your Drupal speed performance     and optimize for better results and server response time. These tips that we’ll cover may be at times specific to Drupal 6 versions, although     you can always learn the best practices from these examples and apply them on your own code base.

Doom skill levels: (easiest first)

1. I’m too young to die

2. Hey, not too rough

3. Hurt me plenty

4. Ultra-violence

5. Nightmare!

  This post is rated “I’m too young too die” difficulty level.

 

Drupal is known for its plethora of hooks, and their use is abundant through-out any Drupal modules to plug into the way that Drupal works. That’s fine, though once you’ve decided you’re moving on with Drupal as your live web application/website and you’re using modules from the eco-system, that is when you need to spend some more time reviewing modules a little bit closer than just their download counts or issues on drupal.org

hook_init() runs on every page load. Imagine you’re having a few modules implementing this hook, then you already have impact on your server response time performance for every page access in Drupal. Maybe those modules have a very slight overhead there, maybe that’s part of what they do, and that’s fine, but it may at times benefit you to review and investigate if the code there, that maybe your team added too, is better being re-factored to some other place and not on every page load.

There is another perspective for it of course, maybe things do need to take place on every page load, but their implementation in the code might be faulty. Imagine you’re doing some expensive IO on every page load, like calling an API, or querying a heavy table. Maybe you can re-factor to cache this information?

 

(adsbygoogle = window.adsbygoogle || []).push({});

The post Drupal Performance Tip – be humble on hook_init() appeared first on Liran Tal's Enginx.

Categories: Drupal

Evolving Web: Parallelized web scraping using RollingCurl

12 January 2015 - 7:35am

The web is full of information! Your web sites probably already use many APIs for maps, Twitter, IP geolocation, and more. But what about data that's on the web, but doesn't have a readily available API?

read more
Categories: Drupal

Yuriy Gerasimov: Centralize your logs with logstash (getting started guide)

12 January 2015 - 4:51am

Logstash is a great tool to centralize logs in your environment. For example we have several drupal webheads that write logs into syslog. It would be really nice to see those logs somewhere centrally to find out about your system's health status and debug potential problems.

In this article I would like to show how easy to start using logstash for local development.

First of all in order to run logstash you need to follow instructions http://logstash.net/docs/1.4.2/tutorials/getting-started-with-logstash.

Logstash has following concepts:

  • inputs -- where we grab logs from. This can be files on local files system, records of database table, redis and many more.
  • codecs -- way you can serialize/unserialize you data. Think about it as json decode when you get records or running json encode when you are saving log message.
  • filters -- instruments to filter particular log records we want to process. Example -- syslog has many records but we want to extract only drupal related.
  • outputs -- where we are passing our processed log records. It can be a file (multiple different formats), stdout or what is most interesting elastic search

Tricky part comes when you need to install Elastic Search to store your logs and Kibana to view them. There is very nice shortcut for development purposes -- to use already built docker image for that.

I have found very handy to use https://registry.hub.docker.com/u/sebp/elk/ image.

So you need docker to be installed (http://docs.docker.com/installation/ubuntulinux/). Then you import docker image and run it.

sudo docker pull sebp/elk sudo docker run -p 5601:5601 -p 9200:9200 -p 5000:5000 -it --name elk sebp/elk

Now we have docker image working plus it has port forwarding to our localhost.

In order to send your logstash logs to elastic search you need to use elasticsearch output. Here is logstash configuration file example that can be run for testing.

input { stdin { } } output { stdout { codec => rubydebug } elasticsearch { host => "localhost" port => "9200" protocol => "http" } }

Now when you run logstash and enter couple of messages they will be fed to elasticsearch. Now you can open http://localhost:5601/ to see kibana in action.

Next step would be to set up your own rules of extracting drupal (or any other type) logs and pushing them to elastic search. But this is very individual task that is out of the scope of this guide.

Tags: drupaldrupal planetlogstash
Categories: Drupal

Paul Rowell: Drupal fields; improving select lists

11 January 2015 - 12:39pm

Everyone knows what a select list is, what it looks like and how it works. But that doesn't mean it can't get better, here a few modules that can be used to improve the experience for users when selecting items.

Categories: Drupal

Drupal Camp NJ 2015: Drupal 8 core critical issues sprint to coincide with camp

11 January 2015 - 8:53am

The Central NJ Drupal Meetup has received one of the first grants from the new Drupal Association Drupal 8 Accelerate program. The Sprint will take place from January 29 to Febrary 1. For more details see https://groups.drupal.org/node/453848 

Categories: Drupal

DrupalOnWindows: Drupal on IIS or Apache

11 January 2015 - 1:38am

In this article I will try to find out if there is any performance lead in running Drupal on IIS over Apache. I will not run any benchmarks on my own, just analyze what I could find about this surfing the web. Type "iis vs apache drupal" in Google and this is what I found.

The links

Drupal Performance on IIS7 vs Apache

Date: Mid 2012

Language English
Categories: Drupal

3C Web Services: How to override field templates in Drupal 7

9 January 2015 - 1:42pm

Drupal provides a quick and simple way to customize field output globally using template files. Overriding a field's template file can be useful if you need to customize the HTML, data, or provide custom logic to a Drupal field. Template files allow you to target all fields, fields of specific names, fields of specific types and fields of specific content types.

Categories: Drupal

Chapter Three: Principles of Configuration Management - Part Two

9 January 2015 - 1:01pm

This is the second in a series of posts about Drupal 8's configuration management system. The Configuration Management Initiative (CMI) was the first Drupal 8 initiative to be announced in 2011, and we've learned a lot during thousands of hours of work on the initiative since then. These posts will share what we've learned and provide background on the why and how. In case you missed it, you can read the first part here.

Categories: Drupal

Drupal Easy: DrupalEasy Podcast 142: New Jersey (News Lightning Round)

9 January 2015 - 12:29pm
Download Podcast 142

...and we're back! After a holiday hiatus, Andrew, Ryan, Ted, and Mike are back for a guest-less news round-up. We set the timer and spent 3 minutes on over a dozen different Drupal-related news items from the past 8 weeks. Drupal 8, Drupal.org user personas, and major merger, someone gets a job, and several 2014 lists are covered, along with our picks of the week.

read more

Categories: Drupal

Dries Buytaert: Acquia retrospective 2014

9 January 2015 - 12:01pm

As is now a tradition for me, here is my annual Acquia retrospective, where I look back at 2014 and share what's on my mind as we start the new year. I take the time to write these retrospectives not only for you dear reader, but also for myself, because I want to keep a record of the changes we've gone through as a company and how my personal thinking is evolving from year to year. But I also write them for you, because you might be able to learn from my experiences or from analyzing the information provided. If you would like to, you can read my previous retrospectives: 2009, 2010, 2011, 2012 and 2013.

For Acquia, 2014 was another incredible year, one where we beat our wildest expectations. We crossed the major milestone of $100 USD million in annual revenue, the majority of which is recurring subscription revenue. It is hard to believe that 2014 was only our sixth full year as a revenue-generating business.

We've seen the most growth from our enterprise customers, but our number of small and medium size customers has grown too. We helped launch and host some incredible sites last year: from weather.com (a top 20 site) to the Emmys. Our efforts in Europe and Asia-Pacific are paying off; our EMEA business grew substantially, and the Australian government decided to switch the entire government to Drupal and the Acquia Platform.

We hired 233 people in 2014 and ended the year with 575 employees. About 25% of our employees work from home. The other 75% work from offices around the world; Burlington MA (US), Portland OR (US), Washington DC (US), Paris (France), Reading (United Kingdom), Ghent (Belgium), Singapore, Brisbane (Australia) and Sydney (Australia). About 75% of our employees are based in the United States. Despite our fast growth rate in staff, recruiting remains a key challenge; it's hard to hire as fast as we do and maintain the high bar we've set for ourselves in terms of talent and commitment.

We raised venture funding twice in 2014: a $50MM series F round led by New Enterprise Associates (NEA) followed by Amazon investing an undisclosed amount of money in our business. It's not like Tom Erickson and I enjoy raising money, but we have been able to secure the financing that is necessary for a fast-growth, enterprise subscription business like Acquia. Building and expanding a sales and marketing team is notoriously difficult and requires big investments. At the same time, we're building and supporting the development of multiple products in parallel. Most companies only build one product. We're going after a big dream to become the preferred platform for what has been called the "pivot point of many enterprise tech stacks" -- the technologies that permit organizations to deliver on the promises of exceptional digital customer experiences from an agile, open, resilient platform. We're going after a big dream and are competing against behemoths. We can't show up to a gunfight with a knife, so to speak.

Building a digital platform for the enterprise

Digital has changed everything, and more and more organizations need or want to transform into digital-first businesses to stay in step with the preferences of their customers. Furthermore, technology innovations keep occurring at an ever faster and more disruptive pace. No organization is immune to the forces of digital disruption. At Acquia, we help our customers with this wave of digital transformation by providing a complete technology platform and the support and security necessary to maintain it. The Acquia Platform consists of tools and support for building, delivery and managing dynamic digital experiences. It includes Acquia Cloud, which helps developers deliver complex applications at scale, and Acquia Lift, our digital engagement services for bringing greater context to highly personalized experiences. Let me give you an update on each of the major components.

Drupal tools and support

Drupal gives organizations the ability to deliver a unified digital experience that includes mobile delivery, social and commerce. Great inefficiencies exist in most organizations that use a variety of different, disconnected systems to achieve those three essentials. They are tired of having to tie things together; content is important, social is important, commerce is important but connecting all these systems seamlessly and integrating them with preferred applications and legacy systems leads to massive inefficiencies. Companies want to do things well, and more often than not, Drupal allows them to do it better, more nimbly and in a far more integrated framework.

In 2010, we laid out our product vision and predicted more and more organizations would start to standardize on Drupal. Running 20 different content management systems on 20 different technology stacks is both an expensive and unnecessary burden. We've seen more and more large organizations re-platform most of their sites to Drupal and the Acquia Platform. They realize they don't need multiple content management systems for different sites. Great examples are Warner Music and Interscope Records, who have hundreds of sites on Drupal across the organization, resulting in significant cost savings and efficiency improvements. The success of our Acquia Cloud Site Factory solution has been gratifying to witness. According to a research study by Forrester Consulting, which we released late last year, ACSF is delivering a 944% return on investment to its adopters.

After many years of discussion and debate in the Drupal community, we launched the Acquia Certification Program in March 2014. So far, 546 Drupal developers from more than 45 countries have earned certification. The exams focus on real world experience, and the predominant comments we've heard this past year are that the exams are tough but fair. Acquia delivered six times the amount of training in 2014 compared to the previous year, and demand shows no sign of slowing.

Last, but definitely not least, is Drupal 8. We contributed significantly to Drupal 8 and helped it to achieve beta status; of the 513 critical Drupal 8 bugs fixed in 2014, Acquia's Office of the CTO helped fix 282 of them. We also funded work on the Drupal Module Upgrader to automate much of the work required to port modules from Drupal 7 to Drupal 8.

Acquia Cloud

But Drupal alone isn't enough for organizations to succeed in this digital-first world. In addition to adopting Drupal, the cloud continues to enable organizations to save time and money on infrastructure management so they can focus on managing websites more efficiently and bringing them to market faster. Acquia customers such as GRAMMY.com have come to depend on the Acquia Cloud to provide them with the kind of rugged, secure scale that ensures when the world's attention is focused on their sites, they will thrive. On a monthly basis, we're now serving more than 33 billion hits, almost 5 billion pageviews, 9 petabytes of data transferred, and logging 13 billion Drupal watchdog log lines. We added many new features to Acquia Cloud in 2014, including log streaming, self-service diagnosis tools, support for teams and permissions, two-factor authentication, new dashboards, improved security with support for Virtual Private Networks (VPNs), an API for Acquia Cloud, and more.

Acquia Lift

As powerful as the Drupal/Acquia Cloud combination may be, our customers demand far more from their digital properties, focusing more and more on optimizing them to fully deliver the best possible experience to each individual user. Great digital experiences have always been personal; today they have to become contextual, intuitively knowing each user and dynamically responding to each user's personal preference from device to location to history with the organization. After two years of development and the acquisition of TruCentric, we launched Acquia Lift in 2014.

It's surprising how many organizations aren't implementing any form of personalization today. Even the most basic level of user segmentation and targeting allows organizations to better serve their visitors and can translate into significant growth and competitive differentiation. Advanced organizations have a single, well-integrated view of the customer to optimize both the experience and the lifetime value of that customer, in a consistent fashion across all of their digital touchpoints. Personalization not only leads to better business results, customers have come to expect it and if they don't find it, they'll go elsewhere to get it. Acquia Lift enables organizations to leverage data from multiple sources in order to serve people with relevant content and commerce based on intent, locations and interests. I believe that Acquia Lift has tremendous opportunity and that it will grow to be a significant business in and of itself.

While our key areas of investment in 2014 were Acquia Cloud and Acquia Lift, we did a lot more. Our Mollom service blocked more than 7.8 billion spam messages with an error rate of only 0.01%. We continue to invest in commerce; we helped launch the new Puma website leveraging our Demandware connector and continue to invest and focus on the integration of content and commerce. Overall, the design and user experience of our products has improved a lot, but it is still an area for us to work on. Expect us to focus more heavily on user experience in 2015.

The results of all our efforts around the launch of the Acquia Platform have not gone unnoticed. In October, Acquia was identified as a Leader in the 2014 Gartner Magic Quadrant for Web Content Management.

The wind is blowing in the right direction

I'm very optimistic about Acquia's future in 2015. I believe we've steered the company to be positioned at the right place at the right time. As more organizations are shifting to becoming digital-first businesses they want to build digital experiences that are more pervasive, more contextual, more targeted, more integrated, and last but not least, more secure.

The consolidation from many individual point solutions to one platform is gaining momentum, although re-platforming is usually a long process. Organizations want the unified or integrated experience that Drupal has to offer, as well as the flexibility of Open Source. It is still time consuming and challenging to create quality content, and I believe there is plenty of opportunity for us and our partners to help with that going forward.

Without a doubt, organizations want to better understand their customers and use data-driven decision to drive growth. Data is becoming the new product. The opportunity this creates in commerce is massive.

Cloud computing and Software as a Service (SaaS) continues to be on the rise. Cloud is top of mind and the transition away from on-premise solutions is accelerating even as the arguments around security and privacy issues in the cloud continue to be raised. While there is a certain amount of emotion, and sometimes politics, people are beginning to realize that the cloud is usually more secure and more robust against cyber-attacks than traditional on-premise systems.

The promise of Drupal 8, arguably the most significant advance in the evolution of the Drupal software, has me very excited. It is shaping up to be a great release, and I'm confident it will further secure Drupal's reputation among developers, designers, agencies and site managers as the most flexible, powerful content management solution available.

All of this is not to say 2015 will be easy. This is an incredibly exciting and fast-changing space in the world of technology. Acquia is growing in an incredibly fast-paced, dynamic sector and we realize our mission is to help our customers understand how to think ahead to ever more innovation and change. Simplifying our overall messaging and defining ourselves around the Acquia Platform is a significant first step.

Of course, none of this success would be possible without the support of our customers, partners, the Drupal community, the Acquia team, and our many friends. Thank you for your support in 2014, and I look forward to working with you to find out what 2015 will bring!

Categories: Drupal

Lullabot: Manage Your Drupal.Org Projects and Sprints with a Kanban Board

9 January 2015 - 11:30am

I'm not very good with managing my tasks through a simple list—despite my best efforts, the list always seems to keep growing. I prefer to use a Kanban Board, a popular method of arranging lists that highlights the current status of each task. It's nice to see that I actually do get things done, after all!

Categories: Drupal

Blink Reaction: Part Five: Cleanup and Troubleshooting

9 January 2015 - 8:37am

Cleaning up is one of the advantages of working with VMs over a bare metal install. Since everything is in the disk image files, we only need to delete the VM. Vagrant provides two commands for this purpose:

Stopping and Deleting the VM

Change to the directory containing the Vagrantfile, and then stop the VM:

vagrant halt

To delete the VM permanently:

vagrant destroy

That’s it!

Categories: Drupal

Code Karate: Drupal Commerce Course

9 January 2015 - 7:01am
Categories: Drupal

Drupal Commerce: Managing D8 module dependencies with the new Composer Manager

9 January 2015 - 6:06am

It's not uncommon for a Drupal module to need an external library in order to function.
Historically, modules such as oauth2_server have done this by asking the end-user to download the library manually and extract it into sites/all/libraries. A hook_requirements() implementation would nag the end-user until the library is found.
Nowadays, all libraries are registered on Packagist and expect to be installed via Composer, which also resolves and downloads their dependencies. Thanks to Composer and modern PHP, the number and usage of libraries has skyrocketed, with Packagist recently counting its 500 millionth package install. Because of this thriving ecosystem, it is now more desirable than ever for modules to depend on libraries instead of reinventing the wheel. Furthermore, it is desirable for modules to release their core logic as libraries, bringing in additional users and contributors from the wider ecosystem.

So, how does Composer work, and why do we need Composer Manager?

Read on for more details...

Categories: Drupal

LimoenGroen company blog: Automatically generated subdomains in Drupal

9 January 2015 - 5:21am

A few weeks ago the new version of MijnStadMijnDorp.nl was launched to the public. Built by LimoenGroen, it offers a rich media platform where historical societies based in the Dutch province of Overijssel showcase their collections.

One of the project challenges was to emphasize the personalized look and feel of each society within the global site structure; every society has its own homepage with an introduction and a collage of curated content. Subdomains (e.g. subdomain.example.com) helped us achieve this. In this article we discuss what we encountered.

The Subdomain module

The core functionality was established using the contrib module Subdomain. In a nutshell, the Subdomain module can be setup to use a unique subdomain for page callbacks related to a specific user, taxonomy term, organic group or content type.

In the case of MijnStadMijnDorp.nl, we used the organic group mode, as each society is an organic group and needed a subdomain. All content of a society lives within its group and has the subdomain applied to it. By default, the name of the subdomain is either based on the name of the organic group or on end user input. We modified this behavior so the subdomain is set to the name of the organic group (society) by default, but can be manually overridden by users with administrative privileges. This comes in handy for societies with long names where an abbreviated subdomain is more suitable.

Automatically set subdomain after node creation:/** * Implements hook_node_insert(). * * Automatically set subdomain after node creation. */ function my_module_node_insert($node) { switch ($node->type) { case 'society': $node->subdomain = subdomain()->clean($node->title, TRUE); subdomain_url_outbound_cache_clear(); // Create unique subdomain. subdomain()->save_record($node->nid, $node->title, TRUE); break; } } Dnsmasq

During local development, testing dynamically generated subdomains can be cumbersome when using a local hosts file, because wildcards cannot be used. Dnsmasq to the rescue! It is a DNS resolver running as a daemon on a local development machine. Dnsmasq was configured to resolve the DNS zone used for local development (e.g. mijnstadmijndorp.dev) to 127.0.0.1. This also resolves any child zones (subdomains) to localhost. Since we use Apache locally, we had ServerAlias *.mijnstadmijndorp.dev added in the virtual host configuration.

Preparations for deployment

Using dynamically generated subdomains in a production environment typically involves configuring the webserver and the DNS zone for the root domain of the website.

For Apache, adding ServerAlias *.mijnstadmijndorp.nl to the virtual host configuration was sufficient. Similar directives were setup for the other servers in our DTAP-environment, with applicable hostnames.

When using HTTPS (which is always a good idea), serving content from dynamically generated subdomains means you need a wildcard certificate. In our case, a public key certificate with *.mijnstadmijndorp.nl as subject name was used.

For DNS, a wildcard (*.mijnstadmijndorp.nl) A-record was created.

Caveats and considerations

The Subdomain module schema has a textfield for the subdomain value, with a maximum length of 255. RFC 1035 states that the maximum length of a DNS label is 63 characters, and the accumulated length of all labels within a FQDN should not exceed 255 characters. The Subdomain module currently does not check the length of the subdomain DNS label or the accumulated length of the FQDN. This can result in URI’s that do not resolve. We submitted a patch for review that fixes this issue.

In terms of SEO, using subdomains should not negatively affect the ranking of a website as a whole. Google has stated they do not treat subdirectories different from subdomains (source), and as such there should be no penalties or split page rank amongst the subdomains. However, discussions on SEO forums indicate ranking was improved for some users when switching from separated subdomains to one shared hostname with subdirectories (source).

Categories: Drupal


Google+
about seo